Learn how to create a new version of an API Gateway REST API that contains new endpoints and backward-incompatible interface changes. Discover the best solution for providing beta access to other developers without affecting customers.
Question
A developer maintains an Amazon API Gateway REST API. Customers use the API through a frontend UI and Amazon Cognito authentication.
The developer has a new version of the API that contains new endpoints and backward-incompatible interface changes. The developer needs to provide beta access to other developers on the team without affecting customers.
Which solution will meet these requirements with the LEAST operational overhead?
A. Define a development stage on the API Gateway API. Instruct the other developers to point the endpoints to the development stage.
B. Define a new API Gateway API that points to the new API application code. Instruct the other developers to point the endpoints to the new API.
C. Implement a query parameter in the API application code that determines which code version to call.
D. Specify new API Gateway endpoints for the API endpoints that the developer wants to add.
Answer
B. Define a new API Gateway API that points to the new API application code. Instruct the other developers to point the endpoints to the new API.
Explanation
The correct answer is B. Define a new API Gateway API that points to the new API application code. Instruct the other developers to point the endpoints to the new API.
This solution will meet the requirements with the least operational overhead because it will allow the developer to provide beta access to the new version of the API without affecting customers. Amazon API Gateway is a service that enables developers to create, publish, maintain, monitor, and secure REST APIs. The developer can define a new API Gateway API that points to the new API application code, which contains the new endpoints and backward-incompatible interface changes. The developer can then instruct the other developers on the team to point the endpoints to the new API, which will have a different URL than the existing API. This way, the developer can test and validate the new version of the API without impacting customers who are using the existing API through a frontend UI and Amazon Cognito authentication.
The other options are not optimal because:
- Option A: Defining a development stage on the API Gateway API will not meet the requirements, as it will affect customers who are using the existing stage. A stage is a logical reference to a lifecycle state of an API, such as development, testing, production, or beta. The developer can define a development stage on the API Gateway API and point it to the new API application code. However, this solution will affect customers who are using the existing stage, such as production or beta, as they will not be able to access the old version of the API that is compatible with their frontend UI and Amazon Cognito authentication. Moreover, this solution will require more operational overhead, as the developer will need to manage multiple stages and configurations for the same API.
- Option C: Implementing a query parameter in the API application code that determines which code version to call will not meet the requirements, as it will introduce complexity and potential errors in the application logic. The developer can implement a query parameter in the API application code that determines which code version to call, such as ?version=new or ?version=old. The developer can then instruct the other developers on the team to use the query parameter to access the new version of the API. However, this solution will introduce complexity and potential errors in the application logic, as it will require conditional branching and error handling for different code versions. Moreover, this solution will not provide a clear separation between the old and new versions of the API, as they will share the same URL and endpoint names.
- Option D: Specifying new API Gateway endpoints for the API endpoints that the developer wants to add will not meet the requirements, as it will not address backward-incompatible interface changes. The developer can specify new API Gateway endpoints for the API endpoints that they want to add, such as /new-endpoint-1 or /new-endpoint-2. The developer can then instruct the other developers on the team to use these new endpoints to access the new features of the API. However, this solution will not address backward-incompatible interface changes that may affect existing endpoints, such as /old-endpoint-1 or /old-endpoint-2. Therefore, this solution will not provide beta access to a complete new version of the API.
Therefore, option B is the best solution for providing beta access to a new version of the API without affecting customers.
The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.