DOP-C02 exam dumps

DOP-C02 practice question 19 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 19

Single answer

You are working as a DevOps engineer for a company that uses AWS. You need to design a CI/CD pipeline for deploying an application to multiple AWS accounts (e.g., dev, staging, and production). The deployment must ensure that code is tested in lower environments before being deployed to production. Additionally, the production account must remain isolated from the dev and staging accounts, with strict access controls in place. Which pipeline deployment pattern would be the most appropriate for this scenario?

  1. A

    Use a single AWS account for all environments and separate the environments using different naming conventions for resources.

  2. B

    Use a single pipeline in the production account to deploy the application to all environments across accounts.

  3. C

    Use a multi-account pipeline with cross-account roles to deploy the application to dev, staging, and production accounts.

  4. D

    Use separate pipelines in each account but trigger deployments manually to maintain isolation.

Show answer and explanation

Correct answer: C

Explanation

A multi-account pipeline with cross-account IAM roles is the recommended deployment pattern for multi-account environments. This approach ensures that each environment (dev, staging, production) resides in its own account for security and isolation. Cross-account roles allow the pipeline to perform deployments securely without exposing unnecessary permissions. It also facilitates automated testing and promotion of code across environments, reducing the risk of human error and operational inefficiencies.

  • A. Incorrect.

    Using a single AWS account with naming conventions does not provide sufficient isolation between environments, which can lead to security and operational risks in a multi-account setup.

  • B. Incorrect.

    Using a single pipeline in the production account violates the principle of least privilege by granting the production account access to dev and staging resources, which compromises isolation and security.

  • C. Correct.

    Using a multi-account pipeline with cross-account roles is the most appropriate solution. It allows strict isolation between accounts while enabling automated deployments through IAM roles, which maintain secure cross-account access.

  • D. Incorrect.

    Using separate pipelines in each account and triggering deployments manually can maintain isolation but adds significant operational overhead and reduces automation, making it less efficient.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam