When to use AWS CLI versus AWS SAM CLI for Lambda function deployment


Hi all, I am a fairly new user of AWS services, including AWS Lambda. My Python lambda function required some external dependencies that required me to opt out of the console editor, so I was looking into the different ways that AWS allows me to deploy lambda functions.

This led me to two (as far as I can tell) methods: using AWS CLI (i.e. aws lambda update-funcition-code) or SAM CLI (i.e. sam deploy). Can someone give me a very general idea on what situations would require me to use one over the other? AWS CLI seems very straight forward to me: create the zip, upload the zip. Is there any reason I should be using SAM CLI over it?

Thank you for everyone's help in advance.

asked 3 years ago598 views
1 Answer

AWS CLI is great when you are just playing around with Lambda. You will want to quickly transition over to AWS SAM when you want to start developing Lambda functions so that you have the ability to build and test locally before deploying to AWS.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions