Lambda CLI commands
In this section, we will go through the various AWS Lambda commands that you might use while building your Lambda functions. We will also learn how you use them to automate your deployment process.
The list-functions command
If you recall, this command was introduced in Chapter 2, Getting Started with AWS Lambda. As its name implies, it lists all Lambda functions in the AWS region you provided. The following command will return all Lambda functions in the North Virginia region:
aws lambda list-functions --region us-east-1
For each function, the response includes the function's configuration information (FunctionName
, Resources usage, Environment
variables, IAM Role, Runtime
environment, and so on), as shown in the following screenshot:

To list only some attributes, such as the function name, you can use the query
filter option, as follows:
aws lambda list-functions --query Functions[].FunctionName[]
The create-function command
If you've read through the preceding chapters, you...