To provide a secondary-Region CodeCommit repository that developers can add as a remote and keep up to date after merges in the primary Region, which approach meets the requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a CodeCommit repository in the secondary Region, create a CodeBuild project that mirrors the primary Region's CodeCommit repo to the secondary repo, invoke CodeBuild with a Lambda, and trigger the Lambda from an EventBridge rule on merge events in the primary repo..
Why this is the answer
The correct option establishes a robust, event-driven mirroring solution. Creating a CodeCommit repository in the secondary Region provides the destination. A CodeBuild project is ideal for executing the mirroring logic (e.g., using git push --mirror). Invoking CodeBuild via Lambda allows for custom logic and integration. EventBridge, triggered by CodeCommit merge events, provides the necessary automation to initiate the mirroring process whenever changes occur in the primary repository. The incorrect options are flawed: Storing repository content in an S3 bucket is not a direct CodeCommit mirroring solution; developers cannot directly interact with an S3 bucket as a Git remote. CodeArtifact is for package management, not Git repository mirroring. A Cloud9 environment is an IDE and not designed for automated, continuous repository mirroring between regions.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed