AWS API Gateway Migration Strategy | Exam Question Answer

Best Strategy for Migrating API Gateway Clients | AWS Certification Exam

Prev Question Next Question

Question

A company currently allows access to their API's to customers via the API gateway.

Currently, all clients have a 6-month period to move from using the older API's to newer versions of the API's.

The code for the API is hosted in AWS Lambda.

Which of the following is the ideal strategy to employ in such a situation?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - C.

The best way is to create a separate stage in the API gateway as maybe ‘v2', and then customers could use both API versions.

They can still slowly change their usage onto the new version in this duration.

Below is the concept of the API stage in the AWS Documentation.

API stage.

"A logical reference to a lifecycle state of your API (for example, 'dev', 'prod', 'beta', 'v2')

API stages are identified by API ID and stage name".

Options A and B are incorrect since access needs to be provided via the gateway.

Option D is incorrect since you need to keep both versions running side by side.

For more information on the API gateway, please refer to the below URL-

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html

In this scenario, the company wants to ensure that their customers move to newer versions of the API's within a specified timeframe. The API is hosted on AWS Lambda, and the API gateway is used to manage the access to the API.

The ideal strategy to employ in such a situation is to create another stage in the API gateway (Option C).

Creating another stage in the API gateway allows the company to deploy and test new versions of the API without affecting the current production version. This new stage is typically used for testing purposes, and it allows the company to make changes to the API without affecting the current production environment.

Once the new version is tested and approved, the company can then promote the new version to production. This allows the customers to move from the older version of the API to the newer version of the API in a controlled manner, without disrupting their access to the API.

Option A, creating another Lambda version, is not the ideal strategy in this scenario. Creating a new version of the Lambda function would mean that the company would have to manage multiple versions of the code, which can quickly become unwieldy.

Option B, creating another Lambda alias, is also not the ideal strategy in this scenario. While aliases are useful for managing different versions of the Lambda function, they are not designed for managing different versions of the API.

Option D, creating a deployment package that would automatically change the link to the new Lambda version, is not the ideal strategy in this scenario. While this option may work, it is not the most efficient way to manage the API's versions. Creating a new stage in the API gateway is a more efficient and controlled way to manage the API's versions.