How to choose between AWS CloudFormation, Terraform, and AWS CDK (DEV309)
Rapid Learning of Infrastructure as Code Tools
Evolution of Infrastructure as Code
Infrastructure as code (IaC) started around 2011-2012 with the launch of AWS CloudFormation
Terraform was launched in 2014, followed by AWS CDK in 2018
The evolution of IaC tools has provided developers with more choices and flexibility
Rapid Learning Exercise: Deploying a Tickerbox Application
The Tickerbox application is a simple website where users can create and share lists
The architecture uses CloudFront, a VPC, Lambda, and DynamoDB
The speaker will demonstrate how to deploy this application using Terraform, CloudFormation, and AWS CDK
Terraform
Terraform L1 (low-level): Manually defining resources using Terraform configuration
Terraform L2 (medium-level): Using Terraform modules to simplify resource definitions
Terraform L3 (high-level): Sharing Terraform modules across multiple teams
CloudFormation
CloudFormation templates can quickly become complex, with hundreds of lines of code
The Scepter tool can be used to structure CloudFormation projects and share templates across teams
AWS CDK
AWS CDK L1 (low-level): Directly defining CloudFormation resources using a programming language
AWS CDK L2 (medium-level): Using higher-level constructs to simplify resource definitions
AWS CDK L3 (high-level): Creating reusable patterns and best practices for your organization
Choosing the Right Tool
Decide if you want to use CloudFormation or Terraform
Determine if you want to use AWS CDK or not
Choose between L1, L2, or L3 implementation
Anti-Patterns to Avoid
Highly opinionated and complex code that is difficult to maintain
Letting the "experts" or "fans" choose the tool without considering the team's needs
Asking customers to build infrastructure without providing them with a sandbox
Over-engineering solutions and neglecting the human effort required
Underestimating the knowledge gap when onboarding new team members
Key Takeaways
Think about how you use the tools (L1, L2, or L3)
Simplify and share knowledge to make the "right thing" the "easy thing"
Consider the different needs of partners and customers when choosing tools
Feedback and Resources
Provide feedback to the speaker using the provided QR code or their LinkedIn profile
The demo code is available on GitHub, where you can also contribute and provide feedback
Your Digital Journey deserves a great story.
Build one with us.
This website stores cookies on your computer.
These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.
If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.