Amazon AWS Certified DevOps Engineer - Professional DOP-C02 Practice Test 23
Question 220
An AWS platform team investigates this condition: An application switches its ALB target group to a new version while both versions connect to a shared relational schema. Which DevOps principle BEST explains the core problem?
- Immutable delivery should replace instances from a versioned launch template and image rather than relying on manual drift.
- Application lifecycle hook and agent logs are primary evidence for an EC2 CodeDeploy failure.
- Concurrent deployment executions must preserve intended release ordering and state consistency.
- Traffic shifting must account for backward-compatible shared-state dependencies.
Explanation
Correct Answer
D:Traffic shifting must account for backward-compatible shared-state dependencies. Relevant first evidence: Review database migration compatibility, rollback requirements and old version connection behavior. The resulting controlled response is: Coordinate expand-and-contract schema changes with the blue/green traffic strategy.
Incorrect Answers
A:Immutable delivery should replace instances from a versioned launch template and image rather than relying on manual drift. This instead addresses a different case: An operations team changes configuration in running EC2 instances manually, and Auto Scaling replacement instances lose those changes. For the stated situation (An application switches its ALB target group to a new version while both versions connect to a shared relational schema.), the better principle is: Traffic shifting must account for backward-compatible shared-state dependencies. The deciding distinction is: Traffic shifting must account for backward-compatible shared-state dependencies.
B:Application lifecycle hook and agent logs are primary evidence for an EC2 CodeDeploy failure. This instead addresses a different case: A CodeDeploy in-place EC2 release fails during ApplicationStart, but the team incorrectly treats the issue as an Auto Scaling failure. For the stated situation (An application switches its ALB target group to a new version while both versions connect to a shared relational schema.), the better principle is: Traffic shifting must account for backward-compatible shared-state dependencies. The deciding distinction is: Traffic shifting must account for backward-compatible shared-state dependencies.
C:Concurrent deployment executions must preserve intended release ordering and state consistency. This instead addresses a different case: Two successive commits trigger deployments against the same production stack, and the earlier execution finishes after the newer release. For the stated situation (An application switches its ALB target group to a new version while both versions connect to a shared relational schema.), the better principle is: Traffic shifting must account for backward-compatible shared-state dependencies. The deciding distinction is: Traffic shifting must account for backward-compatible shared-state dependencies.
Question 221
The DevOps team must resolve this scenario: An ACM-managed certificate is nearing expiration, but an application relies on manually imported certificates whose renewal notifications are ignored. Which engineering change is MOST appropriate?
- Filter relevant state transitions and check desired state before mutating resources.
- Correct the specific startup configuration or image error and deploy a verified revision.
- Use valid renewal procedures and monitored replacement for imported certificates.
- Use ECS service reconciliation with alarms and root-cause escalation for repeated failures.
Explanation
Correct Answer
C:Use valid renewal procedures and monitored replacement for imported certificates. Its validation is: The service presents a current trusted certificate before expiry without unexpected interruption. The principle is: Certificate lifecycle automation must match certificate origin and supported renewal method.
Incorrect Answers
A:Filter relevant state transitions and check desired state before mutating resources. This instead addresses a different case: An event rule starts a Lambda that tags an EC2 resource, and the resulting CloudTrail tagging event triggers the same Lambda repeatedly. For the stated situation (An ACM-managed certificate is nearing expiration, but an application relies on manually imported certificates whose renewal notifications are ignored.), the better engineering action is: Use valid renewal procedures and monitored replacement for imported certificates. The deciding distinction is: Certificate lifecycle automation must match certificate origin and supported renewal method.
B:Correct the specific startup configuration or image error and deploy a verified revision. This instead addresses a different case: An EKS deployment enters CrashLoopBackOff after a config release, although the cluster nodes and pods have adequate CPU. For the stated situation (An ACM-managed certificate is nearing expiration, but an application relies on manually imported certificates whose renewal notifications are ignored.), the better engineering action is: Use valid renewal procedures and monitored replacement for imported certificates. The deciding distinction is: Certificate lifecycle automation must match certificate origin and supported renewal method.
D:Use ECS service reconciliation with alarms and root-cause escalation for repeated failures. This instead addresses a different case: An ECS application task fails health checks every few minutes, and the team restarts the same failing task manually without identifying a dependency outage. For the stated situation (An ACM-managed certificate is nearing expiration, but an application relies on manually imported certificates whose renewal notifications are ignored.), the better engineering action is: Use valid renewal procedures and monitored replacement for imported certificates. The deciding distinction is: Certificate lifecycle automation must match certificate origin and supported renewal method.
Question 222
The DevOps team must resolve this scenario: An enterprise manually creates duplicate IAM users in dozens of accounts for employees, creating slow offboarding. Which engineering change is MOST appropriate?
- Plan OU migrations with explicit baseline deployment and removal behavior tests.
- Automate onboarding through approved Account Factory or supported account vending controls.
- Implement a durable idempotency key and conditional write or transaction guard.
- Use IAM Identity Center groups and governed permission sets for cross-account staff access.
Explanation
Correct Answer
D:Use IAM Identity Center groups and governed permission sets for cross-account staff access. Its validation is: A removed employee loses intended account access without searching for duplicate IAM users. The principle is: Workforce access should be federated and provisioned centrally with time-limited account sessions.
Incorrect Answers
A:Plan OU migrations with explicit baseline deployment and removal behavior tests. 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 (An enterprise manually creates duplicate IAM users in dozens of accounts for employees, creating slow offboarding.), the better engineering action is: Use IAM Identity Center groups and governed permission sets for cross-account staff access. The deciding distinction is: Workforce access should be federated and provisioned centrally with time-limited account sessions.
B:Automate onboarding through approved Account Factory or supported account vending controls. This instead addresses a different case: A company provisions AWS accounts manually and regularly forgets baseline logging and governance settings. For the stated situation (An enterprise manually creates duplicate IAM users in dozens of accounts for employees, creating slow offboarding.), the better engineering action is: Use IAM Identity Center groups and governed permission sets for cross-account staff access. The deciding distinction is: Workforce access should be federated and provisioned centrally with time-limited account sessions.
C:Implement a durable idempotency key and conditional write or transaction guard. This instead addresses a different case: An S3 ObjectCreated event invokes a Lambda that retries a billing update after a transient error and charges the same customer twice. For the stated situation (An enterprise manually creates duplicate IAM users in dozens of accounts for employees, creating slow offboarding.), the better engineering action is: Use IAM Identity Center groups and governed permission sets for cross-account staff access. The deciding distinction is: Workforce access should be federated and provisioned centrally with time-limited account sessions.
Question 223
After implementing a proposed fix, the team reviews: A container image tag is overwritten weekly, so audit teams cannot reproduce the exact build used for an earlier release. Which result would BEST confirm that the risk is addressed?
- An earlier deployment can still retrieve its exact verified image digest.
- A new instance matches the approved image baseline and related tests are traceable.
- An unsigned unapproved digest is blocked while an approved signed build proceeds.
- A test event from a prohibited repository cannot change a production release pipeline.
Explanation
Correct Answer
A:An earlier deployment can still retrieve its exact verified image digest. The approved action is: Enable appropriate image tag immutability or deploy by digest with controlled image retention. The risk principle is: Release artifacts need immutable identifiers and protected retention for reproducibility.
Incorrect Answers
B:A new instance matches the approved image baseline and related tests are traceable. This instead addresses a different case: Production EC2 Auto Scaling launches instances from an AMI built manually months earlier with inconsistent patch levels. For the stated situation (A container image tag is overwritten weekly, so audit teams cannot reproduce the exact build used for an earlier release.), the better verification is: An earlier deployment can still retrieve its exact verified image digest. The deciding distinction is: Release artifacts need immutable identifiers and protected retention for reproducibility.
C:An unsigned unapproved digest is blocked while an approved signed build proceeds. This instead addresses a different case: A registry contains internal and third-party images, and the deployment job cannot distinguish approved signed builds from untrusted tags. For the stated situation (A container image tag is overwritten weekly, so audit teams cannot reproduce the exact build used for an earlier release.), the better verification is: An earlier deployment can still retrieve its exact verified image digest. The deciding distinction is: Release artifacts need immutable identifiers and protected retention for reproducibility.
D:A test event from a prohibited repository cannot change a production release pipeline. This instead addresses a different case: A shared CodePipeline connection to an external source provider allows unrelated projects to trigger privileged production pipelines. For the stated situation (A container image tag is overwritten weekly, so audit teams cannot reproduce the exact build used for an earlier release.), the better verification is: An earlier deployment can still retrieve its exact verified image digest. The deciding distinction is: Release artifacts need immutable identifiers and protected retention for reproducibility.
Question 224
Before changing production, engineers find: A registry contains internal and third-party images, and the deployment job cannot distinguish approved signed builds from untrusted tags. Which investigation should the engineer perform FIRST?
- Check release history, lifecycle expiration rules, active references and recovery windows.
- Inspect package manager configuration, external connections and CodeArtifact permissions.
- Review pipeline execution mode, target resource conflicts and deployment ordering evidence.
- Review signing keys, image digests, publication roles and deployment verification policy.
Explanation
Correct Answer
D:Review signing keys, image digests, publication roles and deployment verification policy. The governing principle is: Container provenance controls should verify publishers and immutable artifact digests. The next controlled engineering decision is: Require trusted image provenance validation before promoting production task revisions.
Incorrect Answers
A:Check release history, lifecycle expiration rules, active references and recovery windows. 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 (A registry contains internal and third-party images, and the deployment job cannot distinguish approved signed builds from untrusted tags.), the better investigation is: Review signing keys, image digests, publication roles and deployment verification policy. The deciding distinction is: Container provenance controls should verify publishers and immutable artifact digests.
B:Inspect package manager configuration, external connections and CodeArtifact permissions. This instead addresses a different case: A CodeBuild project downloads packages from unrestricted public registries even though an internal vetted package repository is required. For the stated situation (A registry contains internal and third-party images, and the deployment job cannot distinguish approved signed builds from untrusted tags.), the better investigation is: Review signing keys, image digests, publication roles and deployment verification policy. The deciding distinction is: Container provenance controls should verify publishers and immutable artifact digests.
C:Review pipeline execution mode, target resource conflicts and deployment ordering evidence. This instead addresses a different case: Two successive commits trigger deployments against the same production stack, and the earlier execution finishes after the newer release. For the stated situation (A registry contains internal and third-party images, and the deployment job cannot distinguish approved signed builds from untrusted tags.), the better investigation is: Review signing keys, image digests, publication roles and deployment verification policy. The deciding distinction is: Container provenance controls should verify publishers and immutable artifact digests.
Question 225
The DevOps team must resolve this scenario: A regulated dataset is protected by S3 copies, but the only operator can permanently delete versions during an incident. Which engineering change is MOST appropriate?
- Define least-privilege emergency DNS roles and practice failover under expected conditions.
- Apply suitable S3 Object Lock and isolated permissions for protected recovery copies.
- Adjust visibility timeout or extend it safely, with idempotent task handling.
- Automate suitable recovery steps with controlled Step Functions or Systems Manager workflows.
Explanation
Correct Answer
B:Apply suitable S3 Object Lock and isolated permissions for protected recovery copies. Its validation is: A deletion attempt cannot destroy protected objects before approved retention expiry. The principle is: Backup retention should resist malicious or accidental deletion for the required period.
Incorrect Answers
A:Define least-privilege emergency DNS roles and practice failover under expected conditions. This instead addresses a different case: The secondary service is healthy, but a disaster exercise reveals operators cannot change DNS because the failover role lacks permission. For the stated situation (A regulated dataset is protected by S3 copies, but the only operator can permanently delete versions during an incident.), the better engineering action is: Apply suitable S3 Object Lock and isolated permissions for protected recovery copies. The deciding distinction is: Backup retention should resist malicious or accidental deletion for the required period.
C:Adjust visibility timeout or extend it safely, with idempotent task handling. This instead addresses a different case: Message consumers regularly process tasks longer than the SQS visibility timeout, causing duplicate deliveries while the first worker is active. For the stated situation (A regulated dataset is protected by S3 copies, but the only operator can permanently delete versions during an incident.), the better engineering action is: Apply suitable S3 Object Lock and isolated permissions for protected recovery copies. The deciding distinction is: Backup retention should resist malicious or accidental deletion for the required period.
D:Automate suitable recovery steps with controlled Step Functions or Systems Manager workflows. This instead addresses a different case: A failover runbook manually changes 14 DNS and compute settings in a fixed order; quarterly drills frequently skip steps. For the stated situation (A regulated dataset is protected by S3 copies, but the only operator can permanently delete versions during an incident.), the better engineering action is: Apply suitable S3 Object Lock and isolated permissions for protected recovery copies. The deciding distinction is: Backup retention should resist malicious or accidental deletion for the required period.
Question 226
An AWS platform team investigates this condition: The security team needs immediate notification if any member account root principal creates an access key or changes account settings. Which DevOps principle BEST explains the core problem?
- High-risk root activity should be centrally detected from reliably recorded audit events.
- Vulnerability assessment should be continuous and integrated with immutable image updates.
- Sensitive-data discovery should be automated and authorized across relevant storage scopes.
- Central security logging depends on correct service delivery permissions for every intended account.
Explanation
Correct Answer
A:High-risk root activity should be centrally detected from reliably recorded audit events. Relevant first evidence: Inspect organization CloudTrail coverage, event patterns and root principal fields. The resulting controlled response is: Use an EventBridge or suitable centralized CloudTrail event detection and escalation.
Incorrect Answers
B:Vulnerability assessment should be continuous and integrated with immutable image updates. 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 (The security team needs immediate notification if any member account root principal creates an access key or changes account settings.), the better principle is: High-risk root activity should be centrally detected from reliably recorded audit events. The deciding distinction is: High-risk root activity should be centrally detected from reliably recorded audit events.
C:Sensitive-data discovery should be automated and authorized across relevant storage scopes. This instead addresses a different case: An enterprise stores thousands of S3 objects across accounts and needs to discover unclassified personal records at scale. For the stated situation (The security team needs immediate notification if any member account root principal creates an access key or changes account settings.), the better principle is: High-risk root activity should be centrally detected from reliably recorded audit events. The deciding distinction is: High-risk root activity should be centrally detected from reliably recorded audit events.
D:Central security logging depends on correct service delivery permissions for every intended account. This instead addresses a different case: A central S3 audit bucket receives CloudTrail from most accounts but one member account fails because a KMS policy condition excludes its trail. For the stated situation (The security team needs immediate notification if any member account root principal creates an access key or changes account settings.), the better principle is: High-risk root activity should be centrally detected from reliably recorded audit events. The deciding distinction is: High-risk root activity should be centrally detected from reliably recorded audit events.
Question 227
A DevOps team is reviewing: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained. Which TWO complementary actions should it take? Select TWO answers.
- Deploy to a bounded canary or targeted cohort and expand only after validated signals.
- Inspect account IDs, test endpoints, IAM permissions and environment variable provenance.
- Review connection scope, repo permissions, webhook events and pipeline triggers.
- Ensure tests exit nonzero on failures and publish test reports in the build workflow.
- Inspect shell error handling, test process exit codes, buildspec commands and report-group output.
Explanation
Correct Answers
D:Ensure tests exit nonzero on failures and publish test reports in the build workflow. This is a required controlled engineering action for the stated situation: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained. The complementary correct action is: Inspect shell error handling, test process exit codes, buildspec commands and report-group output. Both follow the principle: Build success and test reporting must reflect real assertion failures with consumable evidence.
E:Inspect shell error handling, test process exit codes, buildspec commands and report-group output. This is a required diagnostic evidence step for the stated situation: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained. The complementary correct action is: Ensure tests exit nonzero on failures and publish test reports in the build workflow. Both follow the principle: Build success and test reporting must reflect real assertion failures with consumable evidence.
Incorrect Answers
A:Deploy to a bounded canary or targeted cohort and expand only after validated signals. This is suitable for another situation: A new payment option passes staging but causes failures only for a small set of customer geographies. In this case, engineers instead need the paired investigation (Inspect shell error handling, test process exit codes, buildspec commands and report-group output.) and design change (Ensure tests exit nonzero on failures and publish test reports in the build workflow.). These two steps address: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained.
B:Inspect account IDs, test endpoints, IAM permissions and environment variable provenance. This is suitable for another situation: Integration tests frequently overwrite production queues because staging jobs use a copied production endpoint variable. In this case, engineers instead need the paired investigation (Inspect shell error handling, test process exit codes, buildspec commands and report-group output.) and design change (Ensure tests exit nonzero on failures and publish test reports in the build workflow.). These two steps address: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained.
C:Review connection scope, repo permissions, webhook events and pipeline triggers. This is suitable for another situation: A shared CodePipeline connection to an external source provider allows unrelated projects to trigger privileged production pipelines. In this case, engineers instead need the paired investigation (Inspect shell error handling, test process exit codes, buildspec commands and report-group output.) and design change (Ensure tests exit nonzero on failures and publish test reports in the build workflow.). These two steps address: CodeBuild exits zero after a testing script prints failing assertions, and no test result report is retained.
Question 228
An AWS platform team investigates this condition: An alarm invokes a Lambda that restarts services and pages staff, but retries sometimes perform the restart twice and send conflicting messages. Which DevOps principle BEST explains the core problem?
- Configuration compliance events can trigger managed event routing and bounded remediation.
- Synthetic monitoring should exercise user-important paths with appropriate credentials and certificate checks.
- Trace spans can isolate latency contributions across distributed calls.
- Automated incident workflows should have explicit state, idempotent actions and bounded escalation.
Explanation
Correct Answer
D:Automated incident workflows should have explicit state, idempotent actions and bounded escalation. Relevant first evidence: Review event IDs, retry policies, workflow steps and notification delivery. The resulting controlled response is: Use Step Functions or equivalent durable event workflow with safe idempotent transitions.
Incorrect Answers
A:Configuration compliance events can trigger managed event routing and bounded remediation. This instead addresses a different case: Security operations wants alerts whenever Config detects that approved encryption settings are disabled on new storage resources. For the stated situation (An alarm invokes a Lambda that restarts services and pages staff, but retries sometimes perform the restart twice and send conflicting messages.), the better principle is: Automated incident workflows should have explicit state, idempotent actions and bounded escalation. The deciding distinction is: Automated incident workflows should have explicit state, idempotent actions and bounded escalation.
B:Synthetic monitoring should exercise user-important paths with appropriate credentials and certificate checks. This instead addresses a different case: An external application returns 200 for its home page even as the login endpoint has expired certificates and cannot authenticate users. For the stated situation (An alarm invokes a Lambda that restarts services and pages staff, but retries sometimes perform the restart twice and send conflicting messages.), the better principle is: Automated incident workflows should have explicit state, idempotent actions and bounded escalation. The deciding distinction is: Automated incident workflows should have explicit state, idempotent actions and bounded escalation.
C:Trace spans can isolate latency contributions across distributed calls. This instead addresses a different case: An application has slow checkout requests only when external credit checks are called, but aggregate ALB metrics cannot locate the dependency. For the stated situation (An alarm invokes a Lambda that restarts services and pages staff, but retries sometimes perform the restart twice and send conflicting messages.), the better principle is: Automated incident workflows should have explicit state, idempotent actions and bounded escalation. The deciding distinction is: Automated incident workflows should have explicit state, idempotent actions and bounded escalation.
Question 229
A DevOps team is reviewing: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency. Which TWO complementary actions should it take? Select TWO answers.
- Use a controlled approved remediation action or rollback of the unauthorized rule.
- Inspect queue age, processing throughput, instance warmup and policy limits.
- Use stable device partition keys where ordering is required, with monitored throughput.
- Review CloudTrail change events, Config rule status, approval records and owner.
- Review alarm condition, transaction criticality, runbook approvals and current service health.
Explanation
Correct Answers
A:Use a controlled approved remediation action or rollback of the unauthorized rule. This is a required controlled engineering action for the stated situation: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency. The complementary correct action is: Review CloudTrail change events, Config rule status, approval records and owner. Both follow the principle: Temporary security changes need scoped automatic detection and accountable restoration.
D:Review CloudTrail change events, Config rule status, approval records and owner. This is a required diagnostic evidence step for the stated situation: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency. The complementary correct action is: Use a controlled approved remediation action or rollback of the unauthorized rule. Both follow the principle: Temporary security changes need scoped automatic detection and accountable restoration.
Incorrect Answers
B:Inspect queue age, processing throughput, instance warmup and policy limits. This is suitable for another situation: A consumer service has rapidly increasing queue lag, and responders manually launch instances rather than using a safe dynamic policy. In this case, engineers instead need the paired investigation (Review CloudTrail change events, Config rule status, approval records and owner.) and design change (Use a controlled approved remediation action or rollback of the unauthorized rule.). These two steps address: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency.
C:Use stable device partition keys where ordering is required, with monitored throughput. This is suitable for another situation: A telemetry consumer requires per-device ordering but producers assign random partition keys and observations arrive out of sequence. In this case, engineers instead need the paired investigation (Review CloudTrail change events, Config rule status, approval records and owner.) and design change (Use a controlled approved remediation action or rollback of the unauthorized rule.). These two steps address: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency.
E:Review alarm condition, transaction criticality, runbook approvals and current service health. This is suitable for another situation: A production alarm starts an infrastructure rebuild immediately even during a payroll settlement window where failover can corrupt in-flight transactions. In this case, engineers instead need the paired investigation (Review CloudTrail change events, Config rule status, approval records and owner.) and design change (Use a controlled approved remediation action or rollback of the unauthorized rule.). These two steps address: Operations edits a firewall security group to add temporary unrestricted access but forgets to remove it after an emergency.
Question 230
Before changing production, engineers find: A production delivery pipeline remains green after a deployment even though health checks fail during post-deploy traffic. Which investigation should the engineer perform FIRST?
- Compare staging and production package hashes, dependency resolution and pipeline stage contracts.
- Review deployment alarm configuration, canary outcomes, rollback settings and traffic metrics.
- Trace pipeline stages, approval authorization, test outputs and required change windows.
- Review signing keys, image digests, publication roles and deployment verification policy.
Explanation
Correct Answer
B:Review deployment alarm configuration, canary outcomes, rollback settings and traffic metrics. The governing principle is: Release success should depend on monitored application health and recoverable deployment state. The next controlled engineering decision is: Integrate deployment alarms and an automated rollback path for failed acceptance windows.
Incorrect Answers
A:Compare staging and production package hashes, dependency resolution and pipeline stage contracts. This instead addresses a different case: Each environment rebuilds an application from its Git branch, making production binaries differ from staging even when the commit matches. For the stated situation (A production delivery pipeline remains green after a deployment even though health checks fail during post-deploy traffic.), the better investigation is: Review deployment alarm configuration, canary outcomes, rollback settings and traffic metrics. The deciding distinction is: Release success should depend on monitored application health and recoverable deployment state.
C:Trace pipeline stages, approval authorization, test outputs and required change windows. This instead addresses a different case: A critical payments service is automatically promoted from a successful staging build directly into production without business acceptance. For the stated situation (A production delivery pipeline remains green after a deployment even though health checks fail during post-deploy traffic.), the better investigation is: Review deployment alarm configuration, canary outcomes, rollback settings and traffic metrics. The deciding distinction is: Release success should depend on monitored application health and recoverable deployment state.
D:Review signing keys, image digests, publication roles and deployment verification policy. This instead addresses a different case: A registry contains internal and third-party images, and the deployment job cannot distinguish approved signed builds from untrusted tags. For the stated situation (A production delivery pipeline remains green after a deployment even though health checks fail during post-deploy traffic.), the better investigation is: Review deployment alarm configuration, canary outcomes, rollback settings and traffic metrics. The deciding distinction is: Release success should depend on monitored application health and recoverable deployment state.