Amazon AWS Certified DevOps Engineer - Professional DOP-C02 Practice Test 64
Question 630
An AWS platform team investigates this condition: A pipeline uses STS credentials to deploy a stack, but those credentials expire during a long manual approval pause and the deployment later fails. Which DevOps principle BEST explains the core problem?
- Machine credentials should be centrally rotated with coordinated client refresh and access scoping.
- Temporary credential lifetime and retrieval must match execution and approval workflow timing.
- High-impact human administrative access should require MFA and strong federation controls.
- Audit evidence should be isolated from operators who perform high-risk changes.
Explanation
Correct Answer
B:Temporary credential lifetime and retrieval must match execution and approval workflow timing. Relevant first evidence: Inspect session duration, approval stage placement and credential acquisition logic. The resulting controlled response is: Request fresh short-lived credentials only when the gated deployment action begins.
Incorrect Answers
A:Machine credentials should be centrally rotated with coordinated client refresh and access scoping. This instead addresses a different case: Multiple application instances embed a database password that is rotated manually, causing widespread outages after each change. For the stated situation (A pipeline uses STS credentials to deploy a stack, but those credentials expire during a long manual approval pause and the deployment later fails.), the better principle is: Temporary credential lifetime and retrieval must match execution and approval workflow timing. The deciding distinction is: Temporary credential lifetime and retrieval must match execution and approval workflow timing.
C:High-impact human administrative access should require MFA and strong federation controls. This instead addresses a different case: Human operators access high-risk account settings without multifactor authentication, even though a company policy mandates it. For the stated situation (A pipeline uses STS credentials to deploy a stack, but those credentials expire during a long manual approval pause and the deployment later fails.), the better principle is: Temporary credential lifetime and retrieval must match execution and approval workflow timing. The deciding distinction is: Temporary credential lifetime and retrieval must match execution and approval workflow timing.
D:Audit evidence should be isolated from operators who perform high-risk changes. This instead addresses a different case: An administrator can modify production resources and delete the only CloudTrail delivery bucket objects using the same role. For the stated situation (A pipeline uses STS credentials to deploy a stack, but those credentials expire during a long manual approval pause and the deployment later fails.), the better principle is: Temporary credential lifetime and retrieval must match execution and approval workflow timing. The deciding distinction is: Temporary credential lifetime and retrieval must match execution and approval workflow timing.
Question 631
The DevOps team must resolve this scenario: A scheduled Secrets Manager rotation updates a credential, but its consumer application continues using the revoked password and fails authentication. Which engineering change is MOST appropriate?
- Correct rotation and refresh behavior with a tested coordinated client retry path.
- Subscribe to relevant health events through centralized EventBridge and incident workflows.
- Use a controlled Systems Manager automation targeted only to eligible noncompliant nodes.
- Use a controlled approved remediation action or rollback of the unauthorized rule.
Explanation
Correct Answer
A:Correct rotation and refresh behavior with a tested coordinated client retry path. Its validation is: A test rotation allows new connections and does not expose plaintext credentials. The principle is: Credential rotation must coordinate secret state with application connection refresh and validation.
Incorrect Answers
B:Subscribe to relevant health events through centralized EventBridge and incident workflows. This instead addresses a different case: An AWS Health event affects a critical enterprise database in an otherwise quiet account, but the team monitors only application CloudWatch alarms. For the stated situation (A scheduled Secrets Manager rotation updates a credential, but its consumer application continues using the revoked password and fails authentication.), the better engineering action is: Correct rotation and refresh behavior with a tested coordinated client retry path. The deciding distinction is: Credential rotation must coordinate secret state with application connection refresh and validation.
C:Use a controlled Systems Manager automation targeted only to eligible noncompliant nodes. This instead addresses a different case: AWS Config finds an EC2 instance without the approved monitoring agent, but the repair Lambda has permission to modify every resource in the account. For the stated situation (A scheduled Secrets Manager rotation updates a credential, but its consumer application continues using the revoked password and fails authentication.), the better engineering action is: Correct rotation and refresh behavior with a tested coordinated client retry path. The deciding distinction is: Credential rotation must coordinate secret state with application connection refresh and validation.
D:Use a controlled approved remediation action or rollback of the unauthorized rule. This instead addresses a different case: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency. For the stated situation (A scheduled Secrets Manager rotation updates a credential, but its consumer application continues using the revoked password and fails authentication.), the better engineering action is: Correct rotation and refresh behavior with a tested coordinated client retry path. The deciding distinction is: Credential rotation must coordinate secret state with application connection refresh and validation.
Question 632
A DevOps team is reviewing: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception. Which TWO complementary actions should it take? Select TWO answers.
- Review log group retention settings, use case, compliance period and log costs.
- Inspect AWS Health event source, EventBridge rules, targets and account aggregation.
- Inspect log JSON structure, embedded metric declarations and namespace configuration.
- Set an approved retention period and route long-term audit logs to suitable protected storage if needed.
- Inspect load balancer access log settings, S3 policy, Region and delivery status.
Explanation
Correct Answers
A:Review log group retention settings, use case, compliance period and log costs. This is a required diagnostic evidence step for the stated situation: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception. The complementary correct action is: Set an approved retention period and route long-term audit logs to suitable protected storage if needed. Both follow the principle: Log-group retention should reflect business, legal and investigation requirements.
D:Set an approved retention period and route long-term audit logs to suitable protected storage if needed. This is a required controlled engineering action for the stated situation: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception. The complementary correct action is: Review log group retention settings, use case, compliance period and log costs. Both follow the principle: Log-group retention should reflect business, legal and investigation requirements.
Incorrect Answers
B:Inspect AWS Health event source, EventBridge rules, targets and account aggregation. This is suitable for another situation: A regional AWS Health event indicates maintenance of a service used by five accounts, but no on-call team receives it. In this case, engineers instead need the paired investigation (Review log group retention settings, use case, compliance period and log costs.) and design change (Set an approved retention period and route long-term audit logs to suitable protected storage if needed.). These two steps address: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception.
C:Inspect log JSON structure, embedded metric declarations and namespace configuration. This is suitable for another situation: An application emits useful latency values inside structured logs but operators need searchable and alarmable measurements without building a bespoke database. In this case, engineers instead need the paired investigation (Review log group retention settings, use case, compliance period and log costs.) and design change (Set an approved retention period and route long-term audit logs to suitable protected storage if needed.). These two steps address: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception.
E:Inspect load balancer access log settings, S3 policy, Region and delivery status. This is suitable for another situation: An ALB intermittently rejects requests, but access logs are absent because the configured S3 bucket policy denies delivery. In this case, engineers instead need the paired investigation (Review log group retention settings, use case, compliance period and log costs.) and design change (Set an approved retention period and route long-term audit logs to suitable protected storage if needed.). These two steps address: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception.
Question 633
The DevOps team must resolve this scenario: A Lambda cleans abandoned development stacks nightly but occasionally deletes shared production KMS keys due to an imprecise tag query. Which engineering change is MOST appropriate?
- Schedule compliant patching through approved maintenance windows and targeted baselines.
- Enable termination protection and suitable resource retention or backup controls with restricted delete rights.
- Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations.
- Enable inventory collection and central reporting for in-scope managed nodes.
Explanation
Correct Answer
C:Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations. Its validation is: An intentionally mislabelled shared resource is excluded and cleanup actions remain auditable. The principle is: Automated resource cleanup must constrain target scope and irreversible actions.
Incorrect Answers
A:Schedule compliant patching through approved maintenance windows and targeted baselines. This instead addresses a different case: A fleet must receive OS security patches only during approved windows, with controlled reboots and exception reporting. For the stated situation (A Lambda cleans abandoned development stacks nightly but occasionally deletes shared production KMS keys due to an imprecise tag query.), the better engineering action is: Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations. The deciding distinction is: Automated resource cleanup must constrain target scope and irreversible actions.
B:Enable termination protection and suitable resource retention or backup controls with restricted delete rights. This instead addresses a different case: A production database is managed in a stack whose deletion could be triggered by an overly broad cleanup pipeline. For the stated situation (A Lambda cleans abandoned development stacks nightly but occasionally deletes shared production KMS keys due to an imprecise tag query.), the better engineering action is: Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations. The deciding distinction is: Automated resource cleanup must constrain target scope and irreversible actions.
D:Enable inventory collection and central reporting for in-scope managed nodes. This instead addresses a different case: Operations estimates patch compliance from EC2 tags but has no verified installed software inventory. For the stated situation (A Lambda cleans abandoned development stacks nightly but occasionally deletes shared production KMS keys due to an imprecise tag query.), the better engineering action is: Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations. The deciding distinction is: Automated resource cleanup must constrain target scope and irreversible actions.
Question 634
Before changing production, engineers find: A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets. Which investigation should the engineer perform FIRST?
- Review Organizations integration, delegated administrator, enabled standards and aggregation regions.
- Review source and destination OUs, StackSets auto-deployment and SCP effective controls.
- Review effective identity and resource policies, SCP evaluation and organization account membership.
- Inspect the proposed change set, resource identifiers, retention policy and data ownership.
Explanation
Correct Answer
C:Review effective identity and resource policies, SCP evaluation and organization account membership. The governing principle is: SCPs establish maximum permissions and do not grant access by themselves. The next controlled engineering decision is: Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits.
Incorrect Answers
A:Review Organizations integration, delegated administrator, enabled standards and aggregation regions. This instead addresses a different case: Security Hub findings remain isolated in 40 member accounts and security operations cannot reliably track enterprise-wide exposure. For the stated situation (A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets.), the better investigation is: Review effective identity and resource policies, SCP evaluation and organization account membership. The deciding distinction is: SCPs establish maximum permissions and do not grant access by themselves.
B:Review source and destination OUs, StackSets auto-deployment and SCP effective controls. This instead addresses a different case: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review. For the stated situation (A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets.), the better investigation is: Review effective identity and resource policies, SCP evaluation and organization account membership. The deciding distinction is: SCPs establish maximum permissions and do not grant access by themselves.
D:Inspect the proposed change set, resource identifiers, retention policy and data ownership. This instead addresses a different case: A template refactor changes an S3 bucket logical ID, risking replacement of a bucket containing business records. For the stated situation (A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets.), the better investigation is: Review effective identity and resource policies, SCP evaluation and organization account membership. The deciding distinction is: SCPs establish maximum permissions and do not grant access by themselves.
Question 635
After implementing a proposed fix, the team reviews: Deployment artifacts containing sensitive configuration are stored in an S3 bucket with broad read access and no enforced encryption policy. Which result would BEST confirm that the risk is addressed?
- Unauthorized principals cannot read the artifact and authorized actions remain auditable.
- A test release reaches the remote Region using expected artifacts and no excess permissions.
- Repeated builds from approved inputs produce matching dependency inventories and attributable artifacts.
- A rollback drill can retrieve the required prior image while unused versions still expire.
Explanation
Correct Answer
A:Unauthorized principals cannot read the artifact and authorized actions remain auditable. The approved action is: Enforce least-privilege S3 access and approved server-side encryption on release artifacts. The risk principle is: Artifact storage needs controlled access, encryption and traceable retention.
Incorrect Answers
B:A test release reaches the remote Region using expected artifacts and no excess permissions. This instead addresses a different case: A release pipeline runs in one Region but must deploy a serverless service to a second Region with artifacts available for that target. For the stated situation (Deployment artifacts containing sensitive configuration are stored in an S3 bucket with broad read access and no enforced encryption policy.), the better verification is: Unauthorized principals cannot read the artifact and authorized actions remain auditable. The deciding distinction is: Artifact storage needs controlled access, encryption and traceable retention.
C:Repeated builds from approved inputs produce matching dependency inventories and attributable artifacts. This instead addresses a different case: Two identical source commits produce different Lambda packages because the build downloads the newest transitive dependencies each day. For the stated situation (Deployment artifacts containing sensitive configuration are stored in an S3 bucket with broad read access and no enforced encryption policy.), the better verification is: Unauthorized principals cannot read the artifact and authorized actions remain auditable. The deciding distinction is: Artifact storage needs controlled access, encryption and traceable retention.
D:A rollback drill can retrieve the required prior image while unused versions still expire. This instead addresses a different case: A deployment rolls back to a prior ECR image digest that was deleted by an aggressive lifecycle policy the previous night. For the stated situation (Deployment artifacts containing sensitive configuration are stored in an S3 bucket with broad read access and no enforced encryption policy.), the better verification is: Unauthorized principals cannot read the artifact and authorized actions remain auditable. The deciding distinction is: Artifact storage needs controlled access, encryption and traceable retention.
Question 636
A DevOps team is reviewing: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review. Which TWO complementary actions should it take? Select TWO answers.
- Use IAM Identity Center groups and governed permission sets for cross-account staff access.
- Inspect Control Tower landing zone, Account Factory templates and detective guardrails.
- Inspect managed instance registration, SSM Inventory collection and software reports.
- Review source and destination OUs, StackSets auto-deployment and SCP effective controls.
- Plan OU migrations with explicit baseline deployment and removal behavior tests.
Explanation
Correct Answers
D:Review source and destination OUs, StackSets auto-deployment and SCP effective controls. This is a required diagnostic evidence step for the stated situation: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review. The complementary correct action is: Plan OU migrations with explicit baseline deployment and removal behavior tests. Both follow the principle: Account movement can change inherited guardrails and service-managed StackSets targets.
E:Plan OU migrations with explicit baseline deployment and removal behavior tests. This is a required controlled engineering action for the stated situation: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review. The complementary correct action is: Review source and destination OUs, StackSets auto-deployment and SCP effective controls. Both follow the principle: Account movement can change inherited guardrails and service-managed StackSets targets.
Incorrect Answers
A:Use IAM Identity Center groups and governed permission sets for cross-account staff access. This is suitable for another situation: An enterprise manually creates duplicate IAM users in dozens of accounts for employees, creating slow offboarding. In this case, engineers instead need the paired investigation (Review source and destination OUs, StackSets auto-deployment and SCP effective controls.) and design change (Plan OU migrations with explicit baseline deployment and removal behavior tests.). These two steps address: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review.
B:Inspect Control Tower landing zone, Account Factory templates and detective guardrails. This is suitable for another situation: A company provisions AWS accounts manually and regularly forgets baseline logging and governance settings. In this case, engineers instead need the paired investigation (Review source and destination OUs, StackSets auto-deployment and SCP effective controls.) and design change (Plan OU migrations with explicit baseline deployment and removal behavior tests.). These two steps address: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review.
C:Inspect managed instance registration, SSM Inventory collection and software reports. This is suitable for another situation: Operations estimates patch compliance from EC2 tags but has no verified installed software inventory. In this case, engineers instead need the paired investigation (Review source and destination OUs, StackSets auto-deployment and SCP effective controls.) and design change (Plan OU migrations with explicit baseline deployment and removal behavior tests.). These two steps address: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review.
Question 637
After implementing a proposed fix, the team reviews: Operations estimates patch compliance from EC2 tags but has no verified installed software inventory. Which result would BEST confirm that the risk is addressed?
- A noncompliant test node patches during its window and reports a verifiable status.
- Actual installed package inventory reconciles to approved software baseline.
- An intentionally mislabelled shared resource is excluded and cleanup actions remain auditable.
- A newly added test account receives the approved stack and OU removal behavior follows policy.
Explanation
Correct Answer
B:Actual installed package inventory reconciles to approved software baseline. The approved action is: Enable inventory collection and central reporting for in-scope managed nodes. The risk principle is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
Incorrect Answers
A:A noncompliant test node patches during its window and reports a verifiable status. This instead addresses a different case: A fleet must receive OS security patches only during approved windows, with controlled reboots and exception reporting. For the stated situation (Operations estimates patch compliance from EC2 tags but has no verified installed software inventory.), the better verification is: Actual installed package inventory reconciles to approved software baseline. The deciding distinction is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
C:An intentionally mislabelled shared resource is excluded and cleanup actions remain auditable. This instead addresses a different case: A Lambda cleans abandoned development stacks nightly but occasionally deletes shared production KMS keys due to an imprecise tag query. For the stated situation (Operations estimates patch compliance from EC2 tags but has no verified installed software inventory.), the better verification is: Actual installed package inventory reconciles to approved software baseline. The deciding distinction is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
D:A newly added test account receives the approved stack and OU removal behavior follows policy. This instead addresses a different case: A central platform team needs to roll out an approved Config rule to newly joined accounts across multiple Regions without manual role creation each time. For the stated situation (Operations estimates patch compliance from EC2 tags but has no verified installed software inventory.), the better verification is: Actual installed package inventory reconciles to approved software baseline. The deciding distinction is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
Question 638
After implementing a proposed fix, the team reviews: A newly onboarded account does not forward CloudTrail management activity to the security archive account. Which result would BEST confirm that the risk is addressed?
- A management event in a new member account arrives at the controlled log archive.
- The migrated account receives exactly the new OU's required stacks and permissions.
- A role session can write only target resources and expires without key rotation overhead.
- A noncompliant test node patches during its window and reports a verifiable status.
Explanation
Correct Answer
A:A management event in a new member account arrives at the controlled log archive. The approved action is: Deploy an organization-wide CloudTrail trail with protected centralized delivery. The risk principle is: Central organization auditing should cover account lifecycle without relying on each member team.
Incorrect Answers
B:The migrated account receives exactly the new OU's required stacks and permissions. This instead addresses a different case: A team moves an account to a new OU and expects an existing StackSets-managed baseline to remain unchanged without review. For the stated situation (A newly onboarded account does not forward CloudTrail management activity to the security archive account.), the better verification is: A management event in a new member account arrives at the controlled log archive. The deciding distinction is: Central organization auditing should cover account lifecycle without relying on each member team.
C:A role session can write only target resources and expires without key rotation overhead. This instead addresses a different case: A central deployment role uses a shared user access key to write objects to member-account buckets. For the stated situation (A newly onboarded account does not forward CloudTrail management activity to the security archive account.), the better verification is: A management event in a new member account arrives at the controlled log archive. The deciding distinction is: Central organization auditing should cover account lifecycle without relying on each member team.
D:A noncompliant test node patches during its window and reports a verifiable status. This instead addresses a different case: A fleet must receive OS security patches only during approved windows, with controlled reboots and exception reporting. For the stated situation (A newly onboarded account does not forward CloudTrail management activity to the security archive account.), the better verification is: A management event in a new member account arrives at the controlled log archive. The deciding distinction is: Central organization auditing should cover account lifecycle without relying on each member team.
Question 639
Before changing production, engineers find: An updated ECS application changes a JSON field name; the deployment succeeds while downstream order processors begin dropping events. Which investigation should the engineer perform FIRST?
- Inspect image scan reports, vulnerability severity policy and promotion configuration.
- Inspect shell error handling, test process exit codes, buildspec commands and report-group output.
- Inspect producer schema changes, consumer assumptions and live message failures.
- Inspect command verbosity, secret injection, log visibility and token usage.
Explanation
Correct Answer
C:Inspect producer schema changes, consumer assumptions and live message failures. The governing principle is: Contract tests should validate schemas and compatibility between services across versions. The next controlled engineering decision is: Add producer-consumer compatibility checks to the CI pipeline.
Incorrect Answers
A:Inspect image scan reports, vulnerability severity policy and promotion configuration. This instead addresses a different case: A container image with a known critical OS vulnerability is built and deployed because only compilation and unit testing are gated. For the stated situation (An updated ECS application changes a JSON field name; the deployment succeeds while downstream order processors begin dropping events.), the better investigation is: Inspect producer schema changes, consumer assumptions and live message failures. The deciding distinction is: Contract tests should validate schemas and compatibility between services across versions.
B:Inspect shell error handling, test process exit codes, buildspec commands and report-group output. This instead addresses a different case: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained. For the stated situation (An updated ECS application changes a JSON field name; the deployment succeeds while downstream order processors begin dropping events.), the better investigation is: Inspect producer schema changes, consumer assumptions and live message failures. The deciding distinction is: Contract tests should validate schemas and compatibility between services across versions.
D:Inspect command verbosity, secret injection, log visibility and token usage. This instead addresses a different case: A diagnostic CodeBuild command prints an authentication token to CloudWatch Logs before fetching a private package. For the stated situation (An updated ECS application changes a JSON field name; the deployment succeeds while downstream order processors begin dropping events.), the better investigation is: Inspect producer schema changes, consumer assumptions and live message failures. The deciding distinction is: Contract tests should validate schemas and compatibility between services across versions.
Question 640
After implementing a proposed fix, the team reviews: A central S3 audit bucket receives CloudTrail from most accounts but one member account fails because a KMS policy condition excludes its trail. Which result would BEST confirm that the risk is addressed?
- A controlled management event from the affected account arrives in the archive.
- A deliberately vulnerable test image is found and corrected through a tracked release.
- A test rotation preserves authorized access and invalidates the prior credential on schedule.
- A sample finding appears centrally with originating account and severity.
Explanation
Correct Answer
A:A controlled management event from the affected account arrives in the archive. The approved action is: Correct narrowly scoped policy conditions for the approved organization trail. The risk principle is: Central security logging depends on correct service delivery permissions for every intended account.
Incorrect Answers
B:A deliberately vulnerable test image is found and corrected through a tracked release. This instead addresses a different case: A new AMI enters production with an outdated system package, but the organization runs vulnerability assessments only once annually. For the stated situation (A central S3 audit bucket receives CloudTrail from most accounts but one member account fails because a KMS policy condition excludes its trail.), the better verification is: A controlled management event from the affected account arrives in the archive. The deciding distinction is: Central security logging depends on correct service delivery permissions for every intended account.
C:A test rotation preserves authorized access and invalidates the prior credential on schedule. This instead addresses a different case: Multiple application instances embed a database password that is rotated manually, causing widespread outages after each change. For the stated situation (A central S3 audit bucket receives CloudTrail from most accounts but one member account fails because a KMS policy condition excludes its trail.), the better verification is: A controlled management event from the affected account arrives in the archive. The deciding distinction is: Central security logging depends on correct service delivery permissions for every intended account.
D:A sample finding appears centrally with originating account and severity. This instead addresses a different case: A suspicious EC2 credential event generates a GuardDuty finding but never reaches the central analyst workflow. For the stated situation (A central S3 audit bucket receives CloudTrail from most accounts but one member account fails because a KMS policy condition excludes its trail.), the better verification is: A controlled management event from the affected account arrives in the archive. The deciding distinction is: Central security logging depends on correct service delivery permissions for every intended account.