Question #700
A company uses an AWS CodeCommit repository and requires a real-time backup of the repository data in a secondary AWS Region. Which solution fulfills this requirement?
Configure AWS Application Migration Service to replicate the CodeCommit repository to the second Region.
Use AWS Backup to create a daily backup of the CodeCommit repository and enable cross-Region copying to the secondary Region.
Create an Amazon EventBridge rule triggered by repository push events to invoke an AWS Lambda function. The Lambda function clones the repository, packages it into a .zip file, and copies the file to an S3 bucket in the secondary Region.
Set up an Amazon S3 Cross-Region Replication (CRR) rule to automatically replicate the CodeCommit repository's underlying storage to the second Region.
Explanation
Option C is correct because:
- Real-Time Trigger: Amazon EventBridge detects CodeCommit repository push events immediately, ensuring backups occur as changes happen.
- Lambda Automation: The Lambda function clones the latest repository state, packages it, and copies it to S3 in the secondary Region, meeting the real-time requirement.
Other options are incorrect because:
- A: AWS Application Migration Service (MGN) is designed for server migration, not CodeCommit replication.
- B: AWS Backup does not support CodeCommit, and daily backups are not real-time.
- D: CodeCommit's underlying S3 storage is managed by AWS; users cannot configure CRR on it.
Key Points:
- Use EventBridge + Lambda for real-time event-driven workflows.
- CodeCommit backups require custom solutions since AWS Backup isn't supported.
- Avoid relying on AWS-managed resources (e.g., CodeCommit's S3) for direct replication.
Answer
The correct answer is: C