List All AWS Lambda Function Names
Table of Contents
When managing multiple Lambda functions, you often need a quick inventory. The AWS Console works, but clicking through pages is slow when you just want a list.
The Command #
aws lambda list-functions | jq '.Functions | sort_by(.FunctionName) | .[].FunctionName'
This gives you a clean, alphabetically sorted list of function names - one per line.
Breaking It Down #
aws lambda list-functions- returns JSON with all Lambda metadatajq '.Functions'- extracts the array of function objectssort_by(.FunctionName)- sorts alphabetically.[].FunctionName- pulls just the name from each object
Variations #
Get function names with their runtimes:
aws lambda list-functions | jq -r '.Functions | sort_by(.FunctionName) | .[] | "\(.FunctionName) (\(.Runtime))"'
Filter by runtime (e.g., find all Python 3.8 functions):
aws lambda list-functions | jq -r '.Functions[] | select(.Runtime == "python3.8") | .FunctionName'
Count total functions:
aws lambda list-functions | jq '.Functions | length'
Note on Pagination #
If you have more than 50 functions, list-functions paginates by default. Add --no-paginate or use --max-items to get everything in one response, or let the AWS CLI handle pagination automatically with --output json.