IaC or: How I Learned to Stop Worrying and Love AWS (sic)
Lets say you building something in AWS. A typical architecture - perhaps a 3-tier web-app: Load-balancer, app, and database. Maybe you want to use a container platform to run the app, so you will need ECS or EKS. Besides that, you will need VPCs, and subnets, and CloudWatch...This is how the build typically goes...lets go!
You used the console to create your container stack
You created a VPC
and an ALB, EFS
Then the pipeline: CodeCommit, Build, Deploy
then a cluster in ECS
then had to figure out IAM policies
...and now you worried. Will you remember what you did, in what order? Will you be able to replicate it? Did you just adopt a new pet?
...and you still worried. There were many parameters that needed to be customised. Its gonna take time to rebuild this...still looks like a pet? The Ops team love it...but the Devs dont even know where to begin.
So your developers are happy, because it looks like code...but they dont know what this VPC thing is, and how to link it to the cluster....so you still worried
Then you heard about CloudFormation!
After you got over the YAML shock, it looked awesome. You could model all your infrastructure, put them in stacks, and modify the stacks. So you started writing some CFN templates, and have lots of cattle!
To make it easier to write CFN for new resources, you can use ConsoleRecorder But what about the existing resources you’ve built by hand? Use Former2
But....your devs hated this YAML stuff. They need to know about VPCs, and Internet Gateways....and they wanted was a cluster to run their code.
Then you discovered CDK, and learned to stop worrying
This single CDK construct will build a VPC, ALB, ECS Cluster, IAM roles, pulls the container, and run it:
Your devs love it, because it looks like code. They dont need to know about VPCs, and all that stuff. They just get what they want. How does it do that...this is how?
AWS CloudFormation was used to reliably and consistently provision the resources they needed, but the team discovered an unmet need. Although AWS CloudFormation was the right tool for provisioning resources, the team felt that using YAML/JSON was not the right approach for describing their system. AWS CloudFormation templates are basically a flat list of resources and their configuration. They don’t include tools for expressing abstract ideas such as “the injection pipeline” or the “storage layer” or a “dynamodb scanner.”
This post will cover what is AWS Lambda, how it works, and how cold starts can impact performance. It then covers Lambda Snapstart, how to enable, and how to measure its impact on cold starts using different AWS services.