aws lambda list-functions filter out just function names?

Related searches

I just want to get back a list of function names. Ideally I want to get all functions (just their name) starting with "some-prefix*". Can I do this with the cli?

Really want this as a cli command if possible (I want to avoid python or another sdk). I see there is a --cli-input-json arg, can I use that for filtering?


You can do that. Use the --query option. The CLI would look like this:

aws lambda list-functions --region us-east-1 --query 'Functions[].FunctionName' --output text

To get the list of functions whose name begin with some-prefix:

aws lambda list-functions --region us-east-1 --query 'Functions[?starts_with(FunctionName, `some-prefix`) == `true`].FunctionName' --output text

To get the complete JSON, the CLI would be:

aws lambda list-functions --region us-east-1

Details about the query parameter can be found here.

list-functions — AWS CLI 1.18.133 Command Reference, Returns a list of Lambda functions, with the version-specific configuration of each. Lambda When using --output text and the --query argument on a paginated response, the --query For example, us-east-1 filters the list of functions to only include Lambda@Edge functions The function's Amazon Resource Name ( ARN). Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call. Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version. To get more information about a function or version, use GetFunction . See also: AWS API Documentation


As the answer is already given by @krishna, but I was looking for a way to print all function name without specifying a prefix. So here you can get all lambda function name in particular region my default is us-west-2.

aws lambda list-functions  --query 'Functions[*].[FunctionName]' 

Or as I want them out in text format and space separated to use in my bash script so here you can get in text and single line space separated.

aws lambda list-functions --query 'Functions[*].[FunctionName]' --output text | tr '\r\n' ' '

ListFunctions - AWS Lambda, Returns a list of Lambda functions, with the version-specific configuration of each. To get more information about a function or version, use GetFunction. For example, us-east-1 filters the list of functions to only include Lambda@Edge functions replicated from a master function in US East (N. Edit this page on GitHub. For Lambda@Edge functions, the AWS Region of the master function. For example, us-east-1 filters the list of functions to only include Lambda@Edge functions replicated from a master function in US East (N. Virginia).


In addtion my recomendation is to use aws-shell, the interactive productivity booster for the AWS CLI.

The auto-completion and the history function make life very relaxed.

list-functions — AWS CLI 2.0.45 Command Reference, Returns a list of Lambda functions, with the version-specific configuration of each. Lambda When using --output text and the --query argument on a paginated response, the --query For example, us-east-1 filters the list of functions to only include Lambda@Edge functions The function's Amazon Resource Name ( ARN). $ aws lambda get-function --function-name my-function You can also use the AWS Tagging Service’s GetResources API to filter your resources by tags. The GetResources API receives up to 10 filters, with each filter containing a tag key and up to 10 tag values.


aws lambda list-functions command not returning any functions , I have uploaded my helloworld function and can see it within the AWS console when I go to from from the macbook that I uploaded the function from I get: " aws lambda list-functions { "Functions": We use cookies to ensure you get the best experience on our website. aws configure set default.region region-name. AWS Lambda developers can see that during filters declaration, I provided instance-state-name as a filter criterion but passed “*” to display all instance states excluding none of the


epsagon/list-lambdas: Enumerate Lambda functions across , Enumerate Lambda functions across all regions with useful metadata ⚙ - epsagon/list-lambdas. (Based on photo by Valve Software / CC BY-SA 4.0) docker run --rm -v $HOME/.aws:/root/.aws -t list_lambdas:latest --profile myprofile Filter only Lambda functions that have not been active in the last 10 days:. You can use the AWS Command Line Interface to manage functions and other AWS Lambda resources. The AWS CLI uses the AWS SDK for Python (Boto) to interact with the Lambda API.


Function Exposed - Lambda best practice, Ensure that your Amazon Lambda functions are not exposed to everyone. invocation requests to your Lambda functions, restrict access only to to filter the access, the selected Amazon Lambda function is exposed list the names of all AWS Lambda functions currently available in the selected region:. Returns the version-specific settings of a Lambda function or version. The output includes only options that can vary between versions of a function. To modify these settings, use .