Update s3-hosted lambda function code without cloudformation

You need to do 2 things:

  • Copy your code to S3 bucket. Don’t need a new object key in the bucket. Just use the existing one
  • Invoke aws-cli’s “aws lambda update-function-code”, by putting s3 bucket /s3 key in the command line

Then the function will be updated.

You have to do 2nd step because “s3 path” is not really a configuration of lambda itself. The code from s3 is downloaded to lambda container and then forgot by lambda. So you need to “send the code” to lambda again. That’s why you need “aws lambda udpate-function-code”

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.