Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 54
Question 530
An image-processing queue has a handful of permanently invalid payloads that consume every available retry. The incident review finds the following problem: Without redrive, poison messages are repeatedly delivered and hide useful errors. What is the BEST targeted corrective action?
- Increase batch size indefinitely without isolating failures.
- Delete all failures before preserving diagnostics.
- Route exhausted messages to the DLQ and inspect the payload and failure before redrive.
- Use an SNS topic subscription as a replacement for failed-message storage.
Explanation
Correct Answer
C:Route exhausted messages to the DLQ and inspect the payload and failure before redrive. This directly addresses the recorded SQS dead-letter queues failure and should be checked by observing that poisoned messages appear in the DLQ after the chosen receives while valid events continue.
Incorrect Answers
A:Increase batch size indefinitely without isolating failures. This does not repair the identified SQS dead-letter queues failure; the targeted remediation is to route exhausted messages to the DLQ and inspect the payload and failure before redrive.
B:Delete all failures before preserving diagnostics. This does not repair the identified SQS dead-letter queues failure; the targeted remediation is to route exhausted messages to the DLQ and inspect the payload and failure before redrive.
D:Use an SNS topic subscription as a replacement for failed-message storage. This does not repair the identified SQS dead-letter queues failure; the targeted remediation is to route exhausted messages to the DLQ and inspect the payload and failure before redrive.
Question 531
A multi-client HTTP API must reject expired or wrong-audience access tokens before the Lambda integration. The incident review finds the following problem: Merely checking that Authorization is nonempty accepts fabricated or expired tokens. What is the BEST targeted corrective action?
- Accept every token whose JSON payload includes a username.
- Turn off all authorizers once TLS is enabled.
- Configure issuer and audience and verify the route authorizer is attached and handling tokens.
- Compare only whether bearer-token length is greater than ten.
Explanation
Correct Answer
C:Configure issuer and audience and verify the route authorizer is attached and handling tokens. This directly addresses the recorded API Gateway JWT authorizer failure and should be checked by observing that valid JWTs reach integrations while expired, bad-signature, or wrong-audience tokens are rejected.
Incorrect Answers
A:Accept every token whose JSON payload includes a username. This does not repair the identified API Gateway JWT authorizer failure; the targeted remediation is to configure issuer and audience and verify the route authorizer is attached and handling tokens.
B:Turn off all authorizers once TLS is enabled. This does not repair the identified API Gateway JWT authorizer failure; the targeted remediation is to configure issuer and audience and verify the route authorizer is attached and handling tokens.
D:Compare only whether bearer-token length is greater than ten. This does not repair the identified API Gateway JWT authorizer failure; the targeted remediation is to configure issuer and audience and verify the route authorizer is attached and handling tokens.
Question 532
A pipeline needs to prevent credentials in code, configuration, or test fixtures from reaching release artifacts. The incident review finds the following problem: Removing a secret from the latest file does not erase its exposure in repository history. What is the BEST targeted corrective action?
- Assume renaming the branch makes the key private again.
- Grant the exposed key broader permissions so existing builds do not break.
- Revoke and rotate the compromised key, purge sensitive history as appropriate, and add CI scanning.
- Encrypt only the build status badge.
Explanation
Correct Answer
C:Revoke and rotate the compromised key, purge sensitive history as appropriate, and add CI scanning. This directly addresses the recorded secret scanning in CI failure and should be checked by observing that a seeded test secret blocks the merge and revocation evidence confirms the exposed credential is unusable.
Incorrect Answers
A:Assume renaming the branch makes the key private again. This does not repair the identified secret scanning in CI failure; the targeted remediation is to revoke and rotate the compromised key, purge sensitive history as appropriate, and add CI scanning.
B:Grant the exposed key broader permissions so existing builds do not break. This does not repair the identified secret scanning in CI failure; the targeted remediation is to revoke and rotate the compromised key, purge sensitive history as appropriate, and add CI scanning.
D:Encrypt only the build status badge. This does not repair the identified secret scanning in CI failure; the targeted remediation is to revoke and rotate the compromised key, purge sensitive history as appropriate, and add CI scanning.
Question 533
A containerized API uses separate target groups to validate a new task set before production traffic changes. The incident review finds the following problem: Replacing all tasks in place can increase downtime or remove a quick rollback path. What is the BEST targeted corrective action?
- Correct listener and target-group associations and rerun deployment health checks.
- Point both target groups at an unrelated static S3 site.
- Terminate the healthy original task set before testing replacement tasks.
- Disable load-balancer checks to force an unhealthy task set live.
Explanation
Correct Answer
A:Correct listener and target-group associations and rerun deployment health checks. This directly addresses the recorded CodeDeploy ECS blue-green failure and should be checked by observing that the replacement task set passes health checks before traffic moves and the old target remains available for rollback.
Incorrect Answers
B:Point both target groups at an unrelated static S3 site. This does not repair the identified CodeDeploy ECS blue-green failure; the targeted remediation is to correct listener and target-group associations and rerun deployment health checks.
C:Terminate the healthy original task set before testing replacement tasks. This does not repair the identified CodeDeploy ECS blue-green failure; the targeted remediation is to correct listener and target-group associations and rerun deployment health checks.
D:Disable load-balancer checks to force an unhealthy task set live. This does not repair the identified CodeDeploy ECS blue-green failure; the targeted remediation is to correct listener and target-group associations and rerun deployment health checks.
Question 534
A serverless handler emits structured events and wants CloudWatch to extract metrics from logs. The incident review finds the following problem: Including a unique request ID as a metric dimension can create excessive high-cardinality metric series. What is the BEST targeted corrective action?
- Disable CloudWatch Logs delivery before emitting metrics.
- Correct the EMF structure and retain low-cardinality dimensions such as environment and operation.
- Include unique session IDs as dimensions for every request.
- Write unstructured text and assume EMF auto-discovers numeric fields.
Explanation
Correct Answer
B:Correct the EMF structure and retain low-cardinality dimensions such as environment and operation. This directly addresses the recorded CloudWatch embedded metric format failure and should be checked by observing that cloudWatch extracts a named custom metric from the structured log events with the expected dimensions.
Incorrect Answers
A:Disable CloudWatch Logs delivery before emitting metrics. This does not repair the identified CloudWatch embedded metric format failure; the targeted remediation is to correct the EMF structure and retain low-cardinality dimensions such as environment and operation.
C:Include unique session IDs as dimensions for every request. This does not repair the identified CloudWatch embedded metric format failure; the targeted remediation is to correct the EMF structure and retain low-cardinality dimensions such as environment and operation.
D:Write unstructured text and assume EMF auto-discovers numeric fields. This does not repair the identified CloudWatch embedded metric format failure; the targeted remediation is to correct the EMF structure and retain low-cardinality dimensions such as environment and operation.
Question 535
A shipping integration receives duplicate fulfilment notifications for the same order while a worker scales out. The incident review finds the following problem: Duplicate deliveries bypass a stable deduplication check and cause the same side effect twice. What is the BEST targeted corrective action?
- Increase the Lambda timeout without tracking event identity.
- Keep processed-event IDs only in a Lambda process variable.
- Disable every retry including recoverable failures.
- Use the original business event ID in an atomic deduplication guard before invoking the side effect.
Explanation
Correct Answer
D:Use the original business event ID in an atomic deduplication guard before invoking the side effect. This directly addresses the recorded idempotent event handling failure and should be checked by observing that replaying the identical event leaves one committed business operation and one idempotency record.
Incorrect Answers
A:Increase the Lambda timeout without tracking event identity. This does not repair the identified idempotent event handling failure; the targeted remediation is to use the original business event ID in an atomic deduplication guard before invoking the side effect.
B:Keep processed-event IDs only in a Lambda process variable. This does not repair the identified idempotent event handling failure; the targeted remediation is to use the original business event ID in an atomic deduplication guard before invoking the side effect.
C:Disable every retry including recoverable failures. This does not repair the identified idempotent event handling failure; the targeted remediation is to use the original business event ID in an atomic deduplication guard before invoking the side effect.
Question 536
A REST API accepts JSON orders and needs schema validation with a predictable client error. The incident review finds the following problem: Missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions. What is the BEST targeted corrective action?
- Expose an unrestricted mock integration to all clients.
- Attach the correct model and enable request-body validation on the relevant method.
- Move schema validation exclusively into CloudWatch alarms.
- Increase backend memory to handle missing JSON keys.
Explanation
Correct Answer
B:Attach the correct model and enable request-body validation on the relevant method. This directly addresses the recorded API Gateway request validation failure and should be checked by observing that malformed requests produce a client error before backend invocation while valid requests reach the integration.
Incorrect Answers
A:Expose an unrestricted mock integration to all clients. This does not repair the identified API Gateway request validation failure; the targeted remediation is to attach the correct model and enable request-body validation on the relevant method.
C:Move schema validation exclusively into CloudWatch alarms. This does not repair the identified API Gateway request validation failure; the targeted remediation is to attach the correct model and enable request-body validation on the relevant method.
D:Increase backend memory to handle missing JSON keys. This does not repair the identified API Gateway request validation failure; the targeted remediation is to attach the correct model and enable request-body validation on the relevant method.
Question 537
A batch worker consumes SQS messages faster than a constrained third-party dependency can process. The incident review finds the following problem: Unbounded fanout can overwhelm a dependency even if the caller has ample compute capacity. What is the BEST targeted corrective action?
- Drop every delayed event without a recovery or retention strategy.
- Set concurrency limits and tune worker rate using observed throttling and queue age.
- Disable all rate-limit metrics during load testing.
- Increase the number of parallel calls after every 429 response.
Explanation
Correct Answer
B:Set concurrency limits and tune worker rate using observed throttling and queue age. This directly addresses the recorded concurrency backpressure failure and should be checked by observing that downstream 429 rates fall while queue depth and processing age remain within the service objective.
Incorrect Answers
A:Drop every delayed event without a recovery or retention strategy. This does not repair the identified concurrency backpressure failure; the targeted remediation is to set concurrency limits and tune worker rate using observed throttling and queue age.
C:Disable all rate-limit metrics during load testing. This does not repair the identified concurrency backpressure failure; the targeted remediation is to set concurrency limits and tune worker rate using observed throttling and queue age.
D:Increase the number of parallel calls after every 429 response. This does not repair the identified concurrency backpressure failure; the targeted remediation is to set concurrency limits and tune worker rate using observed throttling and queue age.
Question 538
A payments API needs automated rollback if errors rise during a Lambda alias traffic shift. The incident review finds the following problem: Switching all traffic at once removes early canary detection. What is the BEST targeted corrective action?
- Overwrite the production published version instead of using aliases.
- Use an S3 lifecycle rule to split Lambda alias requests.
- Configure the deployment group's traffic schedule and rollback alarms before release.
- Delete CloudWatch alarms during the canary window.
Explanation
Correct Answer
C:Configure the deployment group's traffic schedule and rollback alarms before release. This directly addresses the recorded CodeDeploy Lambda canary failure and should be checked by observing that alias routing starts at the selected small percentage and alarms can trigger rollback.
Incorrect Answers
A:Overwrite the production published version instead of using aliases. This does not repair the identified CodeDeploy Lambda canary failure; the targeted remediation is to configure the deployment group's traffic schedule and rollback alarms before release.
B:Use an S3 lifecycle rule to split Lambda alias requests. This does not repair the identified CodeDeploy Lambda canary failure; the targeted remediation is to configure the deployment group's traffic schedule and rollback alarms before release.
D:Delete CloudWatch alarms during the canary window. This does not repair the identified CodeDeploy Lambda canary failure; the targeted remediation is to configure the deployment group's traffic schedule and rollback alarms before release.
Question 539
A rollback exercise needs to switch a function's traffic pointer without editing code packages. The incident review finds the following problem: Invoking the unqualified mutable $LATEST for production tests confuses tested and deployed revisions. What is the BEST targeted corrective action?
- Test $LATEST and assume aliases always follow it automatically.
- Overwrite a published Lambda version with new code.
- Delete all aliases so clients choose versions randomly.
- Publish the candidate version, update the test alias, and move the production alias only after verification.
Explanation
Correct Answer
D:Publish the candidate version, update the test alias, and move the production alias only after verification. This directly addresses the recorded Lambda alias version testing failure and should be checked by observing that calls through each alias invoke the expected immutable version and production remains stable.
Incorrect Answers
A:Test $LATEST and assume aliases always follow it automatically. This does not repair the identified Lambda alias version testing failure; the targeted remediation is to publish the candidate version, update the test alias, and move the production alias only after verification.
B:Overwrite a published Lambda version with new code. This does not repair the identified Lambda alias version testing failure; the targeted remediation is to publish the candidate version, update the test alias, and move the production alias only after verification.
C:Delete all aliases so clients choose versions randomly. This does not repair the identified Lambda alias version testing failure; the targeted remediation is to publish the candidate version, update the test alias, and move the production alias only after verification.
Question 540
A queue worker should test batch partial failure outputs before a production release. The incident review finds the following problem: Testing a bare JSON object instead of an SQS event misses envelope parsing defects. What is the BEST targeted corrective action?
- Disable tests for malformed records entirely.
- Assert only that the Lambda function imports successfully.
- Replace fixtures with full SQS records and assert the batch failure response contract.
- Send API Gateway request templates as direct SQS Records fixtures without adaptation.
Explanation
Correct Answer
C:Replace fixtures with full SQS records and assert the batch failure response contract. This directly addresses the recorded SQS handler contract tests failure and should be checked by observing that contract tests prove valid records process once logically and only failed IDs are reported.
Incorrect Answers
A:Disable tests for malformed records entirely. This does not repair the identified SQS handler contract tests failure; the targeted remediation is to replace fixtures with full SQS records and assert the batch failure response contract.
B:Assert only that the Lambda function imports successfully. This does not repair the identified SQS handler contract tests failure; the targeted remediation is to replace fixtures with full SQS records and assert the batch failure response contract.
D:Send API Gateway request templates as direct SQS Records fixtures without adaptation. This does not repair the identified SQS handler contract tests failure; the targeted remediation is to replace fixtures with full SQS records and assert the batch failure response contract.