Updating API Gateway Method for Test Users - AWS Certified Developer Exam

Updating API Gateway Method

Prev Question Next Question

Question

Your team has just started using the API gateway service.

Several AWS Lambda functions are used as a backend for the gateway service.

You have deployed the API and made it available for test users.

You have made some changes to the method responsible for the API gateway.

What should be the next step, so that the changes are available for the test users?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - B.

The AWS Documentation mentions the following.

To deploy an API, you create an API deployment and associate it with a stage.

Each stage is a snapshot of the API and is made available for the client to call.

Stages enable robust version control of your API.

For each stage, you can optimize API performance by adjusting the default account-level request throttling limits and enabling API caching.

In addition, you can override stage-level settings for individual methods and define stage variables to pass stage-specific environment contexts to the API integration at runtime.

Every time you update an API, which includes modification of methods, integrations, authorizers, and anything else other than stage settings, you must redeploy the API to an existing stage or to a new stage.

All other options are incorrect since the right way is to Redeploy the API.

For more information on how to deploy an API, please refer to the below URL-

https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html

The correct answer is B. Redeploy the API.

Explanation: API Gateway is a fully managed service provided by AWS that makes it easy to create, deploy, and manage APIs. It acts as a "front door" for your backend services, and you can use it to define HTTP endpoints, map them to AWS Lambda functions, and configure the API Gateway to handle the request/response flow, including authentication and authorization, caching, and rate limiting.

When you make changes to the method responsible for the API gateway, you need to redeploy the API to make those changes available to the test users. The process of deploying an API involves creating a new deployment version of the API, which includes the updated configuration and code changes. After creating a new deployment, you can promote it to a stage, such as a test or production environment, and make it available to your users.

Recreating the gateway service (answer A) would involve deleting the existing API Gateway and creating a new one, which is not necessary or desirable if you just need to make changes to the method. Redeploying the Lambda function (answer C) would update the function's code, but it would not update the API Gateway configuration or deployment. Making a copy of the gateway API (answer D) would not achieve the desired result either, as you would still need to redeploy the copied API to make the changes available to the users.

Therefore, the correct answer is B. Redeploy the API.