Amazon Web Services AWS Certified DevOps Engineer - Professional DOP-C02 Question # 9 Topic 1 Discussion

Amazon Web Services AWS Certified DevOps Engineer - Professional DOP-C02 Question # 9 Topic 1 Discussion

DOP-C02 Exam Topic 1 Question 9 Discussion:
Question #: 9
Topic #: 1

A company uses an AWS CodeArtifact repository to store Python packages that the company developed internally. A DevOps engineer needs to use AWS CodeDeploy to deploy an application to an Amazon EC2 instance. The application uses a Python package that is stored in the CodeArtifact repository. A BeforeInstall lifecycle event hook will install the package.

The DevOps engineer needs to grant the EC2 instance access to the CodeArtifact repository.

Which solution will meet this requirement?


A.

Create a service-linked role for CodeArtifact. Associate the role with the EC2 instance. Use the aws codeartifact get-authorization-token CLI command on the instance.


B.

Configure a resource-based policy for the CodeArtifact repository that allows the Read-FromRepository action for the EC2 instance principal.


C.

Configure ACLs on the CodeArtifact repository to allow the EC2 instance to access the Python package.


D.

Create an instance profile that contains an IAM role that has access to CodeArtifact. Associate the instance profile with the EC2 instance. Use the aws codeartifact login CLI command on the instance.


Get Premium DOP-C02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.