Search code examples
amazon-web-serviceslistaws-lambdaaws-cli

aws cli to list lambda applications


Very simple question -- how to list aws lambda applications using cli?

I'm following:

https://awscli.amazonaws.com/v2/documentation/api/2.1.29/reference/deploy/list-applications.html#examples

To get information about applications

The following list-applications example displays information about all applications that are associated with the user's AWS account.

aws deploy list-applications

And this is what I get:

$ aws deploy list-applications
applications: []

However, I have many aws lambda applications:

enter image description here

how to list them using cli?

UPDATE:

I'm aware of the aws lambda list-functions command, however, it is not the ~functions~ but the applications that I need to list (as functions and the applications are named differently):

enter image description here


Solution

  • You are looking for:

    aws lambda list-functions
    

    This query will list all the details about your lambda, to list only the FunctionNames, or FunctionArns, you have to use:

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

    You can also filter by region for this you can use for example:

    aws lambda list-functions --region eu-west-2
    

    aws deploy list-applications is used to list all of the applications in an AWS CodeDeploy deployment group.


    Edit

    it is not the functions but the applications that I need to list.

    This is not possible, there are no commands to list the lambda applications, because:

    An AWS Lambda application is a combination of Lambda functions, event sources, and other resources that work together to perform tasks. You can use AWS CloudFormation and other tools to collect your application's components into a single package that can be deployed and managed as one resource.

    AWS Lambda applications


    In fact, you can get the name of your application from CloudFormation:

    aws cloudformation list-stacks
    

    but is it a good idea, I don't know ?!