Skip to content

Instantly share code, notes, and snippets.

@allenmichael
Last active January 2, 2020 23:31
Show Gist options
  • Save allenmichael/f0eeb70b9c8b52913baeee3d4d051ec1 to your computer and use it in GitHub Desktop.
Save allenmichael/f0eeb70b9c8b52913baeee3d4d051ec1 to your computer and use it in GitHub Desktop.
aws ec2 describe-regions --query 'Regions[?RegionName != `ap-east-1`]|[?RegionName != `ap-northeast-3`].[RegionName]' --output text | \
xargs -n1 -I{} sh -c 'aws lambda list-functions --region {} --query '"'"'Functions[?starts_with(Runtime, `nodejs8`) == `true`].[FunctionName]'"'"' --output text'
aws ec2 describe-regions --query 'Regions[?RegionName != `ap-east-1`]|[?RegionName != `ap-northeast-3`].[RegionName]' --output text | xargs -n1 -I{} sh -c 'aws lambda list-functions --region {} --query '"'"'Functions[?starts_with(Runtime, `nodejs8`) == `true`].[FunctionName]'"'"' --output text | \
xargs -n1 -I@ echo --function-name=@ --runtime=nodejs10.x --region={}' | \
xargs -n3 -I arg sh -c 'aws lambda update-function-configuration arg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment