Deploying Lambda and CloudFormation - using AWS CLI or SAM?
Starting a project at work, and IU'm trying to figure out the best way to deploying new Lambdas and Cloud Formation, as well as a docker container. For reasons, I can't use CodePipeline for orchestration.
I'm using Jenkins to handle the deployments through various environments, and I know I want to use AWS CLI for the ECR upload and ECS task update. I'm seeing I can use SAM to handle the deployment, but it requires refactoring my project so that it can fit into the SAM directory structure and I want the entirety of my project to fit into one repo (sudo 'atomic' deployments of Cloudformation, Lambdas and Cloudformation).
Can anyone help provide examples of what AWS SAM offers over just the normal CLI, and whether for Cloudformation and Lambdas, which one I should use?
3 comments · 100% upvoted · other discussions
SAM templates are just a shorthand / transformation into CloudFormation.
sam packageandsam deployare aliases to the respectiveaws cloudformationcommands.sam buildis useful if you need to package additional dependencies from a manifest file, but may not be required depending on your needs.