DVA-C02 exam dumps

DVA-C02 practice question 308 of 399

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

DVA-C02 Question 308

Single answer

You are developing an API with Amazon API Gateway and have deployed it to multiple stages: dev, staging, and prod. Your team wants to expose the prod stage under the custom domain 'api.example.com', while keeping the dev and staging stages accessible only via their default stage URLs. How can you achieve this?

  1. A

    Configure the custom domain 'api.example.com' and map it to the prod stage in API Gateway.

  2. B

    Create a custom domain 'api.example.com' and map it to all three stages: dev, staging, and prod.

  3. C

    Assign each stage (dev, staging, and prod) a unique custom domain and SSL certificate.

  4. D

    Use Route 53 to create a DNS record that maps 'api.example.com' to the default URL of the prod stage.

Show answer and explanation

Correct answer: A

Explanation

To expose a specific API Gateway stage under a custom domain, you configure the custom domain and map it to the desired stage within API Gateway. This allows you to control which stage is associated with the custom domain and ensures that other stages remain accessible only via their default URLs.

  • A. Correct.

    Correct. You can configure a custom domain in API Gateway and map it specifically to the prod stage. This approach satisfies the requirement of exposing only the prod stage under the custom domain.

  • B. Incorrect.

    Incorrect. Mapping the custom domain to all three stages would contradict the requirement of keeping dev and staging stages accessible only via their default URLs.

  • C. Incorrect.

    Incorrect. While you can assign unique custom domains to each stage, this approach is unnecessary and does not meet the requirement of exposing only the prod stage under 'api.example.com'.

  • D. Incorrect.

    Incorrect. Route 53 can be used to create DNS records, but it cannot directly map a custom domain to a specific stage in API Gateway. This configuration must be done within API Gateway.

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