Skip to content

Instantly share code, notes, and snippets.

@anatoly-scherbakov
Created May 11, 2020 07:15
Show Gist options
  • Save anatoly-scherbakov/40f7cdb4759635d6d96eedf96495bc4e to your computer and use it in GitHub Desktop.
Save anatoly-scherbakov/40f7cdb4759635d6d96eedf96495bc4e to your computer and use it in GitHub Desktop.
Reserved concurrency per AWS Lambda function
#!/usr/bin/env bash
get_concurrency="aws lambda get-function-concurrency --function-name {} | jq -r '\"{.},\( .ReservedConcurrentExecutions )\"'"
tmpfile=$(tempfile) || exit
aws lambda list-functions \
| jq -r '.Functions[] .FunctionName' \
| parallel "$get_concurrency" > ${tmpfile}
cat ${tmpfile} | sort -t, -k2
rm ${tmpfile}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment