Create the rest API - Amazon SDK for JavaScript
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

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

Starting October 1, 2022, Amazon SDK for JavaScript (v3) will end support for Internet Explorer 11 (IE 11). For details, see Announcing the end of support for Internet Explorer 11 in the Amazon SDK for JavaScript (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.

  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 .