AWS Certified Developer Associate DVA-C01 – Question094

A software company is using AWS CodeBuild to build an application. The buildspec runs the application build and creates a Docker image that contains the application. The company needs to push the Docker image to Amazon Elastic Container Registry (Amazon ECR) only upon the completion of each successful build.
Which solution meets these requirements?

A.
Change the buildspec by adding a post_build phase that uses the commands block to push the Docker image.
B. Change the buildspec by adding a post_build phase that uses the finally block to push the Docker image.
C. Specify the Docker image in the buildspec's artifacts sequence with an action to push the image.
D. Use a batch build to define a build matrix. Use the batch build to push the Docker image.

Correct Answer: C