DVA-C02 exam dumps

DVA-C02 practice question 309 of 399

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

DVA-C02 Question 309

Single answer

You have an API deployed in AWS API Gateway with multiple stages: 'dev', 'test', and 'prod'. You want to configure a custom domain 'api.example.com' to route traffic to the 'prod' stage, while still allowing developers to access the 'test' and 'dev' stages using the default stage URLs. How should you configure this setup?

  1. A

    Create a custom domain 'api.example.com' and map it to the 'prod' stage. Use the default stage URLs to access 'dev' and 'test'.

  2. B

    Create a custom domain 'api.example.com' and map it to the 'prod' stage. Map additional base path mappings to 'dev' and 'test' in the same custom domain.

  3. C

    Create three separate custom domains and map each one to the 'dev', 'test', and 'prod' stages respectively.

  4. D

    API Gateway requires you to use custom domains for all stages, so you must create separate custom domains for each stage.

Show answer and explanation

Correct answer: A

Explanation

In AWS API Gateway, a custom domain can be mapped to a specific stage, such as 'prod', while other stages like 'dev' and 'test' can still be accessed using their default stage URLs. This approach reduces complexity and cost by avoiding the need for multiple custom domains. Mapping additional stages to the same custom domain is possible but unnecessary in this scenario, as default stage URLs can already be used for development and testing.

  • A. Correct.

    This is the correct approach. You can map the custom domain 'api.example.com' to the 'prod' stage and use the default stage URLs for 'dev' and 'test' without needing additional custom domains.

  • B. Incorrect.

    While this is technically possible, it is unnecessary and would add complexity in this scenario since the default stage URLs are available for 'dev' and 'test'.

  • C. Incorrect.

    This approach is overly complex and not required for the given scenario. A single custom domain can suffice for 'prod', while the default stage URLs can be used for 'dev' and 'test'.

  • D. Incorrect.

    This is incorrect. API Gateway does not require custom domains for every stage. You can use default stage URLs for some stages and custom domains for others.

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