Q27 — AWS SAP-C02 Ch.2

Question 27 of 75 | ← Chapter 2

Q177. A company uses an AWS CodeCommit repository. The company must store a backup copy of the data that is in the repository in a second AWS Region.Which solution will meet these requirements?

Correct Answer: C. Create an Amazon EventBridge rule to invoke AWS CodeBuild when the company pushes code to the repository. Use CodeBuild to clone the repository. Create a zip file of the content. Copy the file to an S3 bucket in the second Region

Explanation

should be C Create an Amazon EventBridge rule to invoke AWS CodeBuild when the company pushes code to the repository: This part is correct. You can use EventBridge to trigger a CodeBuild project whenever code is pushed to a CodeCommit repository. This sets up an automated process for handling changes. Use CodeBuild to clone the repository: This is also correct. In your CodeBuild project, you can specify the repository URL and credentials to clone the repository. Create a zip file of the content: This step is accurate as well. You can use standard Linux/Unix commands within your CodeBuild buildspec file to create a zip archive of the repository's content. Copy the file to an S3 bucket in the second region: This is generally correct. After creating the zip file, you can use the AWS CLI or SDK within your CodeBuild project to copy the zip file to an S3 bucket in a second region. Ensure that your CodeBuild environment has the necessary permissions to perform this action.