Amazon AWS Certified DevOps Engineer - Professional DOP-C02 Practice Test 34
Question 330
The DevOps team must resolve this scenario: A pipeline applies a template change that silently replaces a stateful database resource during a minor refactor. Which engineering change is MOST appropriate?
- Run integration tests in a segregated account with constrained resource access.
- Align target-group checks with a reliable application readiness endpoint and reachable port.
- Ensure tests exit nonzero on failures and publish test reports in the build workflow.
- Create and inspect a change set before controlled production execution.
Explanation
Correct Answer
D:Create and inspect a change set before controlled production execution. Its validation is: A destructive replacement requires explicit approval and safe migration planning. The principle is: Infrastructure changes should be previewed and checked for destructive resource effects.
Incorrect Answers
A:Run integration tests in a segregated account with constrained resource access. This instead addresses a different case: Integration tests frequently overwrite production queues because staging jobs use a copied production endpoint variable. For the stated situation (A pipeline applies a template change that silently replaces a stateful database resource during a minor refactor.), the better engineering action is: Create and inspect a change set before controlled production execution. The deciding distinction is: Infrastructure changes should be previewed and checked for destructive resource effects.
B:Align target-group checks with a reliable application readiness endpoint and reachable port. This instead addresses a different case: An ECS task starts successfully but is continually removed from service because its target group health check targets a nonexistent path. For the stated situation (A pipeline applies a template change that silently replaces a stateful database resource during a minor refactor.), the better engineering action is: Create and inspect a change set before controlled production execution. The deciding distinction is: Infrastructure changes should be previewed and checked for destructive resource effects.
C:Ensure tests exit nonzero on failures and publish test reports in the build workflow. 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 (A pipeline applies a template change that silently replaces a stateful database resource during a minor refactor.), the better engineering action is: Create and inspect a change set before controlled production execution. The deciding distinction is: Infrastructure changes should be previewed and checked for destructive resource effects.
Question 331
An AWS platform team investigates this condition: EKS pods restart after a rollout, and their transient filesystem logs disappear before investigators collect them. Which DevOps principle BEST explains the core problem?
- CloudTrail management events can attribute configuration changes when logged and retained appropriately.
- Queue monitoring must track oldest message age and dead-letter handling, not count alone.
- Ephemeral workloads need centralized logs and stable metadata for post-failure analysis.
- Structured logs and Logs Insights queries enable fast grouping by useful dimensions.
Explanation
Correct Answer
C:Ephemeral workloads need centralized logs and stable metadata for post-failure analysis. Relevant first evidence: Review Fluent Bit or approved collector delivery, pod labels and restart events. The resulting controlled response is: Forward container logs with cluster, namespace, pod and deployment identifiers.
Incorrect Answers
A:CloudTrail management events can attribute configuration changes when logged and retained appropriately. This instead addresses a different case: A production security group unexpectedly allows SSH from the internet, and teams disagree who changed it. For the stated situation (EKS pods restart after a rollout, and their transient filesystem logs disappear before investigators collect them.), the better principle is: Ephemeral workloads need centralized logs and stable metadata for post-failure analysis. The deciding distinction is: Ephemeral workloads need centralized logs and stable metadata for post-failure analysis.
B:Queue monitoring must track oldest message age and dead-letter handling, not count alone. This instead addresses a different case: A queue's depth remains modest but its oldest message waits 40 minutes because one poison message repeatedly fails processing. For the stated situation (EKS pods restart after a rollout, and their transient filesystem logs disappear before investigators collect them.), the better principle is: Ephemeral workloads need centralized logs and stable metadata for post-failure analysis. The deciding distinction is: Ephemeral workloads need centralized logs and stable metadata for post-failure analysis.
D:Structured logs and Logs Insights queries enable fast grouping by useful dimensions. This instead addresses a different case: A burst of HTTP 500s appears in logs, but operators query raw text and cannot correlate failures by deployment revision. For the stated situation (EKS pods restart after a rollout, and their transient filesystem logs disappear before investigators collect them.), the better principle is: Ephemeral workloads need centralized logs and stable metadata for post-failure analysis. The deciding distinction is: Ephemeral workloads need centralized logs and stable metadata for post-failure analysis.
Question 332
The DevOps team must resolve this scenario: Security detects unauthorized port scans but cannot determine which source attempted connections to a sensitive subnet. Which engineering change is MOST appropriate?
- Enable sufficient flow log scope with protected centralized analysis.
- Deliver CloudTrail logs to a separate protected account with controlled immutable retention where needed.
- Correct narrowly scoped policy conditions for the approved organization trail.
- Enforce MFA through suitable identity provider or IAM session conditions.
Explanation
Correct Answer
A:Enable sufficient flow log scope with protected centralized analysis. Its validation is: A controlled rejected connection is traceable to source and destination metadata. The principle is: Network flow telemetry can reveal accepted and rejected flow metadata when configured correctly.
Incorrect Answers
B:Deliver CloudTrail logs to a separate protected account with controlled immutable retention where needed. 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 (Security detects unauthorized port scans but cannot determine which source attempted connections to a sensitive subnet.), the better engineering action is: Enable sufficient flow log scope with protected centralized analysis. The deciding distinction is: Network flow telemetry can reveal accepted and rejected flow metadata when configured correctly.
C:Correct narrowly scoped policy conditions for the approved organization trail. 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 (Security detects unauthorized port scans but cannot determine which source attempted connections to a sensitive subnet.), the better engineering action is: Enable sufficient flow log scope with protected centralized analysis. The deciding distinction is: Network flow telemetry can reveal accepted and rejected flow metadata when configured correctly.
D:Enforce MFA through suitable identity provider or IAM session conditions. 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 (Security detects unauthorized port scans but cannot determine which source attempted connections to a sensitive subnet.), the better engineering action is: Enable sufficient flow log scope with protected centralized analysis. The deciding distinction is: Network flow telemetry can reveal accepted and rejected flow metadata when configured correctly.
Question 333
Before changing production, engineers find: A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception. Which investigation should the engineer perform FIRST?
- Inspect subscription filters, destination ARN, Lambda/Kinesis processing and delivery errors.
- Inspect X-Ray service map, trace segments, status errors and downstream call durations.
- Inspect load balancer access log settings, S3 policy, Region and delivery status.
- Review log group retention settings, use case, compliance period and log costs.
Explanation
Correct Answer
D:Review log group retention settings, use case, compliance period and log costs. The governing principle is: Log-group retention should reflect business, legal and investigation requirements. The next controlled engineering decision is: Set an approved retention period and route long-term audit logs to suitable protected storage if needed.
Incorrect Answers
A:Inspect subscription filters, destination ARN, Lambda/Kinesis processing and delivery errors. This instead addresses a different case: CloudWatch Logs receives application errors but the incident analytics system never sees them because the log stream is not forwarded. For the stated situation (A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception.), the better investigation is: Review log group retention settings, use case, compliance period and log costs. The deciding distinction is: Log-group retention should reflect business, legal and investigation requirements.
B:Inspect X-Ray service map, trace segments, status errors and downstream call durations. 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 (A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception.), the better investigation is: Review log group retention settings, use case, compliance period and log costs. The deciding distinction is: Log-group retention should reflect business, legal and investigation requirements.
C:Inspect load balancer access log settings, S3 policy, Region and delivery status. This instead addresses a different case: An ALB intermittently rejects requests, but access logs are absent because the configured S3 bucket policy denies delivery. For the stated situation (A development application sends verbose logs to CloudWatch Logs indefinitely, creating growing cost and a retention-policy exception.), the better investigation is: Review log group retention settings, use case, compliance period and log costs. The deciding distinction is: Log-group retention should reflect business, legal and investigation requirements.
Question 334
An AWS platform team investigates this condition: A stack update frequently fails because an IAM policy and a Lambda function using the policy are created in an unsafe order. Which DevOps principle BEST explains the core problem?
- IaC must express resource relationships and wait for required dependencies before use.
- Reusable infrastructure modules should centralize approved patterns and clear interface parameters.
- Governed configuration changes should trigger timely, scoped detection and remediation.
- Infrastructure drift should be detected and reconciled through controlled IaC changes.
Explanation
Correct Answer
A:IaC must express resource relationships and wait for required dependencies before use. Relevant first evidence: Inspect Ref and GetAtt relationships, DependsOn needs and function creation errors. The resulting controlled response is: Model the dependency in the stack and ensure required resources exist before dependent operations.
Incorrect Answers
B:Reusable infrastructure modules should centralize approved patterns and clear interface parameters. This instead addresses a different case: Five application teams copy and edit the same network subnet definitions in separate CloudFormation stacks, causing inconsistent security controls. For the stated situation (A stack update frequently fails because an IAM policy and a Lambda function using the policy are created in an unsafe order.), the better principle is: IaC must express resource relationships and wait for required dependencies before use. The deciding distinction is: IaC must express resource relationships and wait for required dependencies before use.
C:Governed configuration changes should trigger timely, scoped detection and remediation. This instead addresses a different case: An application team repeatedly disables approved EBS encryption defaults and security reviews detect the drift weeks later. For the stated situation (A stack update frequently fails because an IAM policy and a Lambda function using the policy are created in an unsafe order.), the better principle is: IaC must express resource relationships and wait for required dependencies before use. The deciding distinction is: IaC must express resource relationships and wait for required dependencies before use.
D:Infrastructure drift should be detected and reconciled through controlled IaC changes. This instead addresses a different case: A CloudFormation-managed security group was changed directly in the console, and the next stack update behaves differently from the approved template. For the stated situation (A stack update frequently fails because an IAM policy and a Lambda function using the policy are created in an unsafe order.), the better principle is: IaC must express resource relationships and wait for required dependencies before use. The deciding distinction is: IaC must express resource relationships and wait for required dependencies before use.
Question 335
Before changing production, engineers find: A Kubernetes horizontal pod autoscaler is configured but never scales pods because its custom metric adapter is missing. Which investigation should the engineer perform FIRST?
- Inspect HPA conditions, metrics API, adapter connectivity and pod requests.
- Review target tracking, ALB request metrics, task CPU/memory and scaling cooldown.
- Review writer failover tests, connection pools, DNS refresh and retry strategy.
- Inspect partition key distribution, throttled requests and access patterns.
Explanation
Correct Answer
A:Inspect HPA conditions, metrics API, adapter connectivity and pod requests. The governing principle is: Autoscaling depends on valid observable metrics and resource limits as well as policy objects. The next controlled engineering decision is: Install and configure supported metrics collection and reasonable HPA thresholds.
Incorrect Answers
B:Review target tracking, ALB request metrics, task CPU/memory and scaling cooldown. This instead addresses a different case: An ECS Fargate application scales tasks manually and saturates its ALB during promotional traffic spikes. For the stated situation (A Kubernetes horizontal pod autoscaler is configured but never scales pods because its custom metric adapter is missing.), the better investigation is: Inspect HPA conditions, metrics API, adapter connectivity and pod requests. The deciding distinction is: Autoscaling depends on valid observable metrics and resource limits as well as policy objects.
C:Review writer failover tests, connection pools, DNS refresh and retry strategy. This instead addresses a different case: A critical Aurora service stores data reliably but a client uses a short hardcoded connection timeout and does not retry after writer promotion. For the stated situation (A Kubernetes horizontal pod autoscaler is configured but never scales pods because its custom metric adapter is missing.), the better investigation is: Inspect HPA conditions, metrics API, adapter connectivity and pod requests. The deciding distinction is: Autoscaling depends on valid observable metrics and resource limits as well as policy objects.
D:Inspect partition key distribution, throttled requests and access patterns. This instead addresses a different case: A DynamoDB table has substantial unused provisioned capacity but requests to one partition key still throttle under burst load. For the stated situation (A Kubernetes horizontal pod autoscaler is configured but never scales pods because its custom metric adapter is missing.), the better investigation is: Inspect HPA conditions, metrics API, adapter connectivity and pod requests. The deciding distinction is: Autoscaling depends on valid observable metrics and resource limits as well as policy objects.
Question 336
A DevOps team is reviewing: A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets. Which TWO complementary actions should it take? Select TWO answers.
- Inspect organization trail settings, S3 bucket/KMS access and Region configuration.
- Configure central Security Hub administration and cross-Region aggregation as appropriate.
- Inspect Ref and GetAtt relationships, DependsOn needs and function creation errors.
- Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits.
- Review effective identity and resource policies, SCP evaluation and organization account membership.
Explanation
Correct Answers
D:Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits. This is a required controlled engineering action 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 complementary correct action is: Review effective identity and resource policies, SCP evaluation and organization account membership. Both follow the principle: SCPs establish maximum permissions and do not grant access by themselves.
E:Review effective identity and resource policies, SCP evaluation and organization account membership. This is a required diagnostic evidence step 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 complementary correct action is: Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits. Both follow the principle: SCPs establish maximum permissions and do not grant access by themselves.
Incorrect Answers
A:Inspect organization trail settings, S3 bucket/KMS access and Region configuration. This is suitable for another situation: A newly onboarded account does not forward CloudTrail management activity to the security archive account. In this case, engineers instead need the paired investigation (Review effective identity and resource policies, SCP evaluation and organization account membership.) and design change (Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits.). These two steps address: A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets.
B:Configure central Security Hub administration and cross-Region aggregation as appropriate. This is suitable for another situation: Security Hub findings remain isolated in 40 member accounts and security operations cannot reliably track enterprise-wide exposure. In this case, engineers instead need the paired investigation (Review effective identity and resource policies, SCP evaluation and organization account membership.) and design change (Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits.). These two steps address: A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets.
C:Inspect Ref and GetAtt relationships, DependsOn needs and function creation errors. This is suitable for another situation: A stack update frequently fails because an IAM policy and a Lambda function using the policy are created in an unsafe order. In this case, engineers instead need the paired investigation (Review effective identity and resource policies, SCP evaluation and organization account membership.) and design change (Provide explicit least-privilege IAM permissions while retaining appropriate SCP limits.). These two steps address: A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets.
Question 337
Before changing production, engineers find: A pipeline fails at CodeBuild DOWNLOAD_SOURCE with AccessDenied after a KMS key policy change. Which investigation should the engineer perform FIRST?
- Inspect build logs, artifact S3 bucket, KMS key policy and CodeBuild role permissions.
- Inspect Auto Scaling activity history, placement errors, launch template and allowed subnets.
- Review delivery guarantees, subscriptions, DLQs and consumer coupling.
- Review RDS Performance Insights, lock wait events, query changes and deployment timing.
Explanation
Correct Answer
A:Inspect build logs, artifact S3 bucket, KMS key policy and CodeBuild role permissions. The governing principle is: Pipeline stage errors must be traced to the actual denied action and role boundary. The next controlled engineering decision is: Restore required narrowly scoped decrypt and object-read permissions.
Incorrect Answers
B:Inspect Auto Scaling activity history, placement errors, launch template and allowed subnets. This instead addresses a different case: An Auto Scaling group repeatedly fails to launch enough instances in one AZ despite other AZs having capacity. For the stated situation (A pipeline fails at CodeBuild DOWNLOAD_SOURCE with AccessDenied after a KMS key policy change.), the better investigation is: Inspect build logs, artifact S3 bucket, KMS key policy and CodeBuild role permissions. The deciding distinction is: Pipeline stage errors must be traced to the actual denied action and role boundary.
C:Review delivery guarantees, subscriptions, DLQs and consumer coupling. This instead addresses a different case: One order-created event needs to inform billing, fulfillment and analytics independently, but a direct Lambda chain loses downstream events when one service is unavailable. For the stated situation (A pipeline fails at CodeBuild DOWNLOAD_SOURCE with AccessDenied after a KMS key policy change.), the better investigation is: Inspect build logs, artifact S3 bucket, KMS key policy and CodeBuild role permissions. The deciding distinction is: Pipeline stage errors must be traced to the actual denied action and role boundary.
D:Review RDS Performance Insights, lock wait events, query changes and deployment timing. This instead addresses a different case: A new backend version causes transaction timeouts and rising database deadlocks, while CPU utilization remains moderate. For the stated situation (A pipeline fails at CodeBuild DOWNLOAD_SOURCE with AccessDenied after a KMS key policy change.), the better investigation is: Inspect build logs, artifact S3 bucket, KMS key policy and CodeBuild role permissions. The deciding distinction is: Pipeline stage errors must be traced to the actual denied action and role boundary.
Question 338
An engineering review identifies: A newly onboarded account does not forward CloudTrail management activity to the security archive account. Which shortcut is MOST unsafe for this exact condition?
- Ask analysts to sign in to each account manually every morning.
- Use a local console event history as a long-term immutable central audit archive.
- Use an Allow statement in an SCP as the sole authorization for a principal.
- Assume YAML syntax validation proves a stateful resource update is nondestructive.
Explanation
Correct Answer
B:Use a local console event history as a long-term immutable central audit archive. The case is: A newly onboarded account does not forward CloudTrail management activity to the security archive account. A safer engineering response is: Deploy an organization-wide CloudTrail trail with protected centralized delivery. The deciding principle is: Central organization auditing should cover account lifecycle without relying on each member team.
Incorrect Answers
A:Ask analysts to sign in to each account manually every morning. 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 newly onboarded account does not forward CloudTrail management activity to the security archive account.), the better unsafe assumption to reject is: Use a local console event history as a long-term immutable central audit archive. The deciding distinction is: Central organization auditing should cover account lifecycle without relying on each member team.
C:Use an Allow statement in an SCP as the sole authorization for a principal. This instead addresses a different case: A team attaches an AWS Organizations SCP allowing S3 access and assumes member-account workloads now have permission to list all buckets. For the stated situation (A newly onboarded account does not forward CloudTrail management activity to the security archive account.), the better unsafe assumption to reject is: Use a local console event history as a long-term immutable central audit archive. The deciding distinction is: Central organization auditing should cover account lifecycle without relying on each member team.
D:Assume YAML syntax validation proves a stateful resource update is nondestructive. 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 newly onboarded account does not forward CloudTrail management activity to the security archive account.), the better unsafe assumption to reject is: Use a local console event history as a long-term immutable central audit archive. The deciding distinction is: Central organization auditing should cover account lifecycle without relying on each member team.
Question 339
Before changing production, engineers find: A DynamoDB table has substantial unused provisioned capacity but requests to one partition key still throttle under burst load. Which investigation should the engineer perform FIRST?
- Inspect Lambda concurrent executions, throttles, payment API quotas and latency.
- Inspect hit ratios, query rate, freshness needs and per-user access controls.
- Map recovery dependencies, state transitions, approvals and rollback criteria.
- Inspect partition key distribution, throttled requests and access patterns.
Explanation
Correct Answer
D:Inspect partition key distribution, throttled requests and access patterns. The governing principle is: A hot partition can throttle despite table-wide capacity and requires appropriate key design. The next controlled engineering decision is: Redesign a skewed access key or shard high-volume writes while maintaining correct queries.
Incorrect Answers
A:Inspect Lambda concurrent executions, throttles, payment API quotas and latency. This instead addresses a different case: A public API invokes Lambda and saturates an external payment service when automatic concurrency grows after a marketing event. For the stated situation (A DynamoDB table has substantial unused provisioned capacity but requests to one partition key still throttle under burst load.), the better investigation is: Inspect partition key distribution, throttled requests and access patterns. The deciding distinction is: A hot partition can throttle despite table-wide capacity and requires appropriate key design.
B:Inspect hit ratios, query rate, freshness needs and per-user access controls. This instead addresses a different case: An authenticated read-heavy API repeatedly queries a database for identical catalog metadata, exhausting database read capacity. For the stated situation (A DynamoDB table has substantial unused provisioned capacity but requests to one partition key still throttle under burst load.), the better investigation is: Inspect partition key distribution, throttled requests and access patterns. The deciding distinction is: A hot partition can throttle despite table-wide capacity and requires appropriate key design.
C:Map recovery dependencies, state transitions, approvals and rollback criteria. 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 DynamoDB table has substantial unused provisioned capacity but requests to one partition key still throttle under burst load.), the better investigation is: Inspect partition key distribution, throttled requests and access patterns. The deciding distinction is: A hot partition can throttle despite table-wide capacity and requires appropriate key design.
Question 340
The DevOps team must resolve this scenario: Operations estimates patch compliance from EC2 tags but has no verified installed software inventory. Which engineering change is MOST appropriate?
- Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations.
- Plan OU migrations with explicit baseline deployment and removal behavior tests.
- Enable inventory collection and central reporting for in-scope managed nodes.
- Create reviewed document versions with least-privilege roles and maxConcurrency/maxErrors limits.
Explanation
Correct Answer
C:Enable inventory collection and central reporting for in-scope managed nodes. Its validation is: Actual installed package inventory reconciles to approved software baseline. The principle is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
Incorrect Answers
A:Use explicit account/OU boundaries, safe tags, dry-run records and approval for destructive operations. 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 engineering action is: Enable inventory collection and central reporting for in-scope managed nodes. The deciding distinction is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
B: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 (Operations estimates patch compliance from EC2 tags but has no verified installed software inventory.), the better engineering action is: Enable inventory collection and central reporting for in-scope managed nodes. The deciding distinction is: Fleet governance needs measured configuration and software inventory rather than intended metadata.
D:Create reviewed document versions with least-privilege roles and maxConcurrency/maxErrors limits. This instead addresses a different case: A fleet automation document runs shell commands as root across all tagged instances with no peer review or limit on execution concurrency. For the stated situation (Operations estimates patch compliance from EC2 tags but has no verified installed software inventory.), the better engineering action is: Enable inventory collection and central reporting for in-scope managed nodes. The deciding distinction is: Fleet governance needs measured configuration and software inventory rather than intended metadata.