Created
March 6, 2025 11:22
-
-
Save tichopad/2b19abf362ab69b3c8d72db6b5cc4d8e to your computer and use it in GitHub Desktop.
List all AWS Lambda functions' reserved concurrency
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
#!/bin/bash | |
# Get all Lambda function names | |
function_names=$(aws lambda list-functions --query 'Functions[*].FunctionName' --output text) | |
echo "Lambda Functions with Reserved Concurrency:" | |
echo "-------------------------------------------" | |
# Check each function for reserved concurrency | |
for func in $function_names; do | |
concurrency=$(aws lambda get-function-concurrency --function-name $func --query "ReservedConcurrentExecutions" --output text 2>/dev/null) | |
# If the function has reserved concurrency (not "None") | |
if [ "$concurrency" != "None" ]; then | |
echo "Function: $func, Reserved Concurrency: $concurrency" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment