Reputation: 97
Details - I have a CircleCI job that makes a zip of my lambda code and uploads it to S3 (We just keep updating the version of same s3 object for e.g. code.zip we dont change name). Now i have CDK AWS code where i am defining the body of my lambda and making use of the s3 zip file using this url https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Code.html#static-fromwbrbucketbucket-key-objectversion.
Issue - Now i want something automated deployment that whenever there is new version of code.zip file gets uploaded to S3, my all lambdas using should be automatically updated with the latest code.
Please suggest !!!
Upvotes: 2
Views: 604
Reputation: 66
I can think of 2 solution for this
aws lambda update-function-code
--function-name your_function_name
--s3-bucket --s3-key your_code.zip
And in you lambda function which will be triggered by S3 upload you can again use same AWS cli command to update your lambda function
Upvotes: 1