Q4 — AWS DOP-C02 Ch.1

Question 4 of 100 | ← Chapter 1

A development team is building a full-stack serverless web application consisting of a backend REST API and a frontend built using a single-page application (SPA) framework. The team wants to adopt a Git-based workflow for development and deployment. They created an AWS CodeCommit repository to store application code. They want to use multiple development branches to test new features and ensure that code changes on development branches are deployed to different development environments. Code changes to the main branch must be automatically promoted to production.

Correct Answer: A. Create an application in the AWS Amplify console and connect the CodeCommit repository. Create feature branch deployments for each environment. Connect the Route 53 domain to the application and enable automatic subdomain creation.

Explanation

AWS Amplify natively supports Git-based workflows with automatic branch-to-environment mapping. When developers push to a new branch, Amplify automatically creates a new deployment environment. The main branch maps to production, while feature branches (e.g., develop) map to isolated preview environments. Amplify Hosting supports connecting custom domains and automatically provisioning subdomains per branch (e.g., feature-branch.app.example.com). This satisfies all requirements with zero infrastructure-as-code or custom automation. Options B, C, and D require significant custom logic (Lambda, Elastic Beanstalk environment management, or multiple pipelines), increasing operational overhead and complexity compared to Amplify’s built-in capabilities.