Yesterday (November 3, 2021), I presented on the November meetup of ServerlessDays Amsterdam, where I introduced using CDK with serverless use-cases. After that, I thought about migrating to CDK for the teams that have already chosen this fantastic deployment framework.
Here is the link for the recording.
Time codes: 3:20 - 23:30
Examples from the presentation:
Let's imagine the debate over using Infrastructure as a Code tool is over. One could go and start with Cloud Formation Kit. There are other options, of course. I spoke of them in my other article. What steps could one take for migrations?
We are developing a developer's dream project with the latest and freshest tools. With this in mind, let's create new infrastructure stacks. The most important is to go straight to CDK. The one issue will be choosing the language. Here it depends on the primary language of the team. The front-end teams would prefer Typescript. Java backend people will use this language.
This case can be a challenge. Here try to group resources in stacks and find a way to connect them. If you have more than 20 resources, it could be better to create a separate stack. Also, using constructs could help for logical grouping. Think of them as modules.
One could use the hybrid approach where the template will be together in the same project with the CDK application. An example could be a pipeline provisioned with CloudFormation. The infra for business logic would use a programming language.
A similar approach could work with other deployment tools. There are multiple ways to connect stacks:
- By outputs
- By creating shared SSM Parameter Store/Secrets Manager
The latter one gives the ability to create a resource, save its id in one stack. One could use it in a different stack as a parameter. However, both approaches could work depending on the needs. Usage of outputs is widespread because one does not care which tool was used. However, secrets give a way to use any resource from any stack that other teams created.
Thanks for reading and watching me! Follow me on Twitter:
Igor SorokaI think it is crucial for startups to invest their time in building repeatable infrastructure code. This will prevent manually recreating complex systems. Of course, #serverless with it - will be an ideal choice. #aws twitter.com/TechCrunch/sta…07:03 AM - 11 Oct 2021TechCrunch @TechCrunchInvestors share how infrastructure as code is taking over DevOps https://t.co/UyRtc4L3w5