DVA-C02 exam dumps

DVA-C02 practice question 268 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 268

Single answer

A developer is managing an API in Amazon API Gateway and wants to deploy it to different environments like 'development', 'staging', and 'production'. They want to ensure that each environment has its own endpoint and can be managed independently. Which feature of API Gateway should the developer use to achieve this?

  1. A

    Deploy separate APIs for each environment.

  2. B

    Use API Gateway stages to manage different environments.

  3. C

    Create separate API Gateway accounts for each environment.

  4. D

    Use Lambda versions and aliases instead of API Gateway stages.

Show answer and explanation

Correct answer: B

Explanation

API Gateway stages are designed to help developers create and manage multiple environments for a single API. Each stage has a unique endpoint and can be configured independently, making it the best approach for managing environments like 'development', 'staging', and 'production'.

  • A. Incorrect.

    Deploying separate APIs for each environment would require redundant configuration and management. This is not a recommended approach as API Gateway stages are designed for this purpose.

  • B. Correct.

    API Gateway stages are specifically designed to enable developers to create different environments such as 'development', 'staging', and 'production'. Each stage has its own URL endpoint and can be independently configured and managed.

  • C. Incorrect.

    Creating separate API Gateway accounts for each environment adds unnecessary complexity and is not required. API Gateway stages provide a more efficient solution.

  • D. Incorrect.

    Lambda versions and aliases can be used for versioning Lambda functions, but they do not provide the environment management capabilities that API Gateway stages offer.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam