Created
November 22, 2016 19:58
-
-
Save andywirv/f312d561c9702522f6d4ede1fe2750bd to your computer and use it in GitHub Desktop.
Update Lambda function configuration, specifically the environment variables. AWS Cli version aws-cli/1.11.20
This file contains 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
#quotes on json, single around entire object and double on each property | |
aws lambda update-function-configuration --function-name=[lambda function name] --environment '{"Variables":{"abc":"124"}}' |
I ran into this too! Thanks for posting this workaround.
I filed an issue here: aws/aws-cli#2638
We are calling update-function-configuration from an npm script and ran into issues around quotes.
I thought I would share the eventual thing that worked.
Note the single quotes around the $npm_config
vars.
"postsync": "aws lambda update-function-configuration --function-name $npm_config_lambda --environment '{\"Variables\":{\"envtype\":\"'$npm_config_envtype'\",\"domain\":\"'$npm_config_domain'\"}}'"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! I was going nuts with their documentation!
This doesn't work:
And this is missing a key little part which you noted: