Part 4 - Inspect the API Gateway API Configuration

For this lab, we’ll implement the third option: throttling. Follow the steps below to configure and deploy an API Gateway API in front of your REST API application.

1. In the AWS Management Console, type api gateway into the search box to navigate to the API Gateway console. See the figure below.

2. The code you created will have deployed an API Gateway so browse to the WebAPIChalleng–yourname configuration. This API will be regional, rather than edge optimized or private.

4. Select the ANY value under {proxy+}

6. In the method test view, select GET as the method, /api/values as the path, then click the test button. The response body (shown at upper-right of the pane) should show the same json response as we saw in the browser earlier. If you test the POST method, ensure you add Content-type:application/json to the headers box (no quotes).

7. Review the API Gateway throttling documentation for more information about how throttling works. You can access the Default Throttling through the 1) Stages, 2) click on the stage (eg ‘prod’), 3) Enable Throttling.

8. Change the throttling values to 1 request/second, with a burst rate of 2 requests. We’re choosing this low value to make it easier to test without load-testing software. Save your changes.

9. Copy the Invoke URL, and create a new GET request in Postman for that URL plus “/api/values” (no quotes). Verify that you get back the same json response as earlier. The URL will look something like:

You have now deployed an API Gateway API to proxy requests to your Web API, implemented throttling, and verified the API Gateway API is accessible.