Created
April 16, 2019 14:20
-
-
Save dave-malone/55870cbe13e09466713bc0c4b8165b62 to your computer and use it in GitHub Desktop.
An example of how to automate Lamba code updates, versions, and aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm hello_world_python_lambda.zip | |
zip -r hello_world_python_lambda.zip greengrasssdk greengrassHelloWorld.py | |
update_lambda_result=$(aws lambda update-function-code \ | |
--function-name Greengrass_HelloWorld \ | |
--zip-file fileb://hello_world_python_lambda.zip \ | |
--publish) | |
latest_lambda_version=$(echo "$update_lambda_result" | jq -r '.Version') | |
aws lambda update-alias \ | |
--function-name Greengrass_HelloWorld \ | |
--function-version $latest_lambda_version \ | |
--name GG_HelloWorld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment