Menu
AWS Lambda
Developer Guide

Step 1.2: Set Up the AWS Command Line Interface (AWS CLI)

All the exercises in this guide assume that you are using administrator user credentials (adminuser) in your account to perform the operations. For instructions on creating an administrator user in your AWS account, see Step 1.1: Set Up an AWS Account and Create an Administrator User, and then follow the steps to download and configure the AWS Command Line Interface (AWS CLI).

To set up the AWS CLI

  1. Download and configure the AWS CLI. For instructions, see the following topics in the AWS Command Line Interface User Guide.

  2. Add a named profile for the administrator user in the AWS CLI config file. You use this profile when executing the AWS CLI commands.

    Copy
    [profile adminuser] aws_access_key_id = adminuser access key ID aws_secret_access_key = adminuser secret access key region = aws-region

    For a list of available AWS regions, see Regions and Endpoints in the Amazon Web Services General Reference.

  3. Verify the setup by entering the following commands at the command prompt.

    • Try the help command to verify that the AWS CLI is installed on your computer:

      Copy
      aws help
    • Try a Lambda command to verify the user can reach AWS Lambda. This command lists Lambda functions in the account, if any. The AWS CLI uses the adminuser credentials to authenticate the request.

      Copy
      aws lambda list-functions --profile adminuser

Now that you have set up an account and AWS CLI, you can create your first Lambda function. For instructions, see Step 2: Create a HelloWorld Lambda Function and Explore the Console.