aws lambda list-functions
aws lambda list-functions --query "Functions[].FunctionName" --output text lists the names of every Lambda function in the current region. The CLI handles pagination, and --query can filter on fields such as Runtime, MemorySize or LastModified, for example to find functions on a deprecated runtime.
What the command does
The command returns the configuration of each function's unpublished version ($LATEST): name, ARN, runtime, handler, role, memory, timeout, code size, architecture, package type, last-modified time, environment variable names and values, VPC config and layers. It does not include tags, triggers or concurrency settings.
The API returns up to 50 functions per page; the CLI keeps requesting pages until it has them all.
Syntax
aws lambda list-functions [--function-version ALL] [--max-items 20] [--query ...] [--region ...]Worked examples
Names only:
aws lambda list-functions --query "Functions[].FunctionName" --output text | tr '\t' '\n'
A readable inventory table:
aws lambda list-functions \
--query "Functions[].{Name:FunctionName,Runtime:Runtime,Mem:MemorySize,Timeout:Timeout,Arch:Architectures[0]}" \
--output table
Functions on runtimes you need to upgrade:
aws lambda list-functions \
--query "Functions[?Runtime=='python3.9' || Runtime=='nodejs18.x'].[FunctionName,Runtime]" \
--output json
Container-image functions have no Runtime; find them with Functions[?PackageType=='Image'].
Names matching a pattern (there is no server-side name filter):
aws lambda list-functions \
--query "Functions[?contains(FunctionName, 'orders')].FunctionName" --output json
Recently changed functions, newest first:
aws lambda list-functions \
--query "reverse(sort_by(Functions, &LastModified))[:10].[FunctionName,LastModified]" \
--output json
Every function in every enabled region:
for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
aws lambda list-functions --region "$r" --query "Functions[].[\`$r\`,FunctionName]" --output text
doneFinding triggers
list-functions cannot tell you what invokes a function. Triggers live in two places:
| Trigger type | Where to look |
|---|---|
| Poll-based: SQS, Kinesis, DynamoDB Streams, Kafka, MQ | aws lambda list-event-source-mappings --function-name my-function |
| Push-based: S3, SNS, API Gateway, EventBridge | The function's resource policy: aws lambda get-policy --function-name my-function, plus the source service's own configuration |
Gotchas
- Environment values are in the output. Secrets kept in plain environment variables appear in this listing for anyone with
lambda:ListFunctions. Use Secrets Manager or Parameter Store instead. - Text output and pagination.
sort_byand slicing run per page with--output text; use JSON for sorted or sliced results. --function-version ALLadds an entry for every published version, which can multiply output many times over.- Lambda@Edge replicas show up in edge regions;
--master-region us-east-1narrows the list to replicas of functions from that region. - Totals.
aws lambda get-account-settingsreports code storage used and the account's concurrency limit, which a sum ofCodeSizehere only partly explains (published versions and layers count too). - Permissions cannot be scoped per function.
lambda:ListFunctionsworks on all functions in the region or none, so a role that can list sees every function's configuration, including environment variables. - Tags need another call. Use
aws lambda list-tags --resourcewith a function ARN, or the Resource Groups Tagging API to find functions by tag across services.
Questions
How do I list only Lambda function names?
aws lambda list-functions --query "Functions[].FunctionName" --output text.
How do I list Lambda triggers with the CLI?
Use list-event-source-mappings for SQS, Kinesis and DynamoDB triggers, and get-policy to see which services such as S3 or API Gateway are allowed to invoke the function.
How do I list Lambda functions in all regions?
Loop over the region codes from aws ec2 describe-regions and run list-functions with --region for each one.
Knowing which functions exist and what changed recently is half of Lambda triage. CloudConsole, a phone app for AWS, is built to show functions, their errors and their logs on a phone.
About the app → · Download on the App Store