Create the rest API - AWS SDK for JavaScript

Help us improve the AWS SDK for JavaScript version 3 (V3) documentation by providing feedback using the Feedback link, or create an issue or pull request on GitHub.

The AWS SDK for JavaScript V3 API Reference Guide describes in detail all the API operations for the AWS SDK for JavaScript version 3 (V3).

Create the rest API

You can use the API Gateway console to create a rest endpoint for the Lambda function. Once done, you are able to invoke the Lambda function using a restful call.

  1. Sign in to the Amazon API Gateway console.

  2. Under Rest API, choose Build.

    
                    DynamoDB table
  3. Select New API.

    
                    DynamoDB table
  4. Specify Employee as the API name and provide a description.

    
                    DynamoDB table
  5. Choose Create API.

  6. Choose Resources under the Employee section.

    
                    DynamoDB table
  7. In the name field, specify employees.

  8. Choose Create Resources.

  9. From the Actions dropdown, choose Create Resources.

    
                    DynamoDB table
  10. Choose /employees, select Create Method from the Actions, then select GET from the drop-down menu below /employees. Choose the checkmark icon.

    
                    DynamoDB table
  11. Choose Lambda function and enter mylambdafunction as the Lambda function name. Choose Save .

    
                    DynamoDB table