This is day 1 / 100 of my 100DaysOfCloud where I explore and build applications on the cloud. I will see where this will take me as I work on this everyday for the next 100 days.
I have tinkered with AWS Cloud Formation before through Java CDK.
Ways I know of to deploy infrastructure on AWS:
- CDK ( Java )
- AWS CloudFormation yml files
- AWS Sam
All of which are infrastructure as code
I think that the matter of which to choose... depends on the infrastructure type and complexity. E.g. AWS Sam is more tailored for Serverless apps.
The AWS Serverless Application Model (SAM) is an abstraction layer in front of CloudFormation that makes it easy to write serverless applications in AWS.
The biggest difference is that Serverless is written to deploy FaaS (Function as a Service) functions to different providers. Sam is for AWS.
I watched this video on AWS SAM, and applied what's in it. It went well.
AWS SAM Tutorial (with a Lambda Example!)
In this video, Be A Better Dev showcases how we can use AWS Sam to describe the infrastructure of a serverless app that mainly uses AWS Lambda and API Gateway and deploy it to AWS under AWS Cloudformation.
Note that AWS Cloudformation has it's yml syntax and all, and can be used without AWS Sam.
Another note is that in the video, deleting the stacks isn't mentioned. I went with
cd sam-app
sam --help // to get help
sam delete // to delete the stack
Other videos I watched today:
Practical Projects to Learn AWS
What is AWS CloudFormation? Pros and Cons?
The Most Important AWS Core Services That You NEED To Know About!