Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 60
Question 590
A DynamoDB Streams consumer needs to process only modifications with a specific status value. The incident review finds the following problem: Missing or incorrect event filter patterns cause unwanted work or dropped eligible records. What is the BEST targeted corrective action?
- Correct the filter JSON against the actual event envelope and test matching and nonmatching records.
- Implement EventBridge rule patterns against a queue message with no EventBridge integration.
- Rebuild the DynamoDB table on every event.
- Raise the function timeout to filter records automatically.
Explanation
Correct Answer
A:Correct the filter JSON against the actual event envelope and test matching and nonmatching records. This directly addresses the recorded Lambda event filtering failure and should be checked by observing that matching records reach the handler and unrelated records do not produce application processing.
Incorrect Answers
B:Implement EventBridge rule patterns against a queue message with no EventBridge integration. This does not repair the identified Lambda event filtering failure; the targeted remediation is to correct the filter JSON against the actual event envelope and test matching and nonmatching records.
C:Rebuild the DynamoDB table on every event. This does not repair the identified Lambda event filtering failure; the targeted remediation is to correct the filter JSON against the actual event envelope and test matching and nonmatching records.
D:Raise the function timeout to filter records automatically. This does not repair the identified Lambda event filtering failure; the targeted remediation is to correct the filter JSON against the actual event envelope and test matching and nonmatching records.
Question 591
A team needs cost control and predictable deletion of old routine Lambda logs. The incident review finds the following problem: Leaving retention unlimited can accumulate unnecessary log storage and compliance exposure. What is the BEST targeted corrective action?
- Increase the Lambda timeout to control log retention.
- Set and audit the requested log-group retention days while preserving legal-hold exceptions.
- Delete the log group daily including current troubleshooting events.
- Store retention days in an API query string with no log-group configuration.
Explanation
Correct Answer
B:Set and audit the requested log-group retention days while preserving legal-hold exceptions. This directly addresses the recorded CloudWatch log retention failure and should be checked by observing that old routine log events age out according to policy while newer diagnostic events stay queryable.
Incorrect Answers
A:Increase the Lambda timeout to control log retention. This does not repair the identified CloudWatch log retention failure; the targeted remediation is to set and audit the requested log-group retention days while preserving legal-hold exceptions.
C:Delete the log group daily including current troubleshooting events. This does not repair the identified CloudWatch log retention failure; the targeted remediation is to set and audit the requested log-group retention days while preserving legal-hold exceptions.
D:Store retention days in an API query string with no log-group configuration. This does not repair the identified CloudWatch log retention failure; the targeted remediation is to set and audit the requested log-group retention days while preserving legal-hold exceptions.
Question 592
A shopping-cart table uses TTL cleanup and needs correct authorization even before deletion. The incident review finds the following problem: Treating TTL cleanup as synchronous can keep expired data valid until deletion occurs. What is the BEST targeted corrective action?
- Turn off expiration checks when Time to Live is enabled.
- Assume DynamoDB TTL removes a record at the exact second.
- Validate expiration in the request path and let TTL remove expired items later.
- Use a GSI to force TTL deletion instantly.
Explanation
Correct Answer
C:Validate expiration in the request path and let TTL remove expired items later. This directly addresses the recorded DynamoDB TTL expiry semantics failure and should be checked by observing that an expired item is denied by the app even when the physical DynamoDB item has not yet disappeared.
Incorrect Answers
A:Turn off expiration checks when Time to Live is enabled. This does not repair the identified DynamoDB TTL expiry semantics failure; the targeted remediation is to validate expiration in the request path and let TTL remove expired items later.
B:Assume DynamoDB TTL removes a record at the exact second. This does not repair the identified DynamoDB TTL expiry semantics failure; the targeted remediation is to validate expiration in the request path and let TTL remove expired items later.
D:Use a GSI to force TTL deletion instantly. This does not repair the identified DynamoDB TTL expiry semantics failure; the targeted remediation is to validate expiration in the request path and let TTL remove expired items later.
Question 593
A team needs repeatable local invocation of SAM-defined handlers using saved JSON events. The incident review finds the following problem: Skipping runtime-compatible local tests can miss event-shape and handler configuration bugs. What is the BEST targeted corrective action?
- Supply realistic event fixtures and execute SAM local tests before cloud integration testing.
- Treat a template lint pass as proof that every business branch behaves correctly.
- Deploy directly to production to inspect each syntax error.
- Unit-test only a text file containing the handler name.
Explanation
Correct Answer
A:Supply realistic event fixtures and execute SAM local tests before cloud integration testing. This directly addresses the recorded local SAM API testing failure and should be checked by observing that test output demonstrates the expected HTTP or handler response for valid and invalid fixtures.
Incorrect Answers
B:Treat a template lint pass as proof that every business branch behaves correctly. This does not repair the identified local SAM API testing failure; the targeted remediation is to supply realistic event fixtures and execute SAM local tests before cloud integration testing.
C:Deploy directly to production to inspect each syntax error. This does not repair the identified local SAM API testing failure; the targeted remediation is to supply realistic event fixtures and execute SAM local tests before cloud integration testing.
D:Unit-test only a text file containing the handler name. This does not repair the identified local SAM API testing failure; the targeted remediation is to supply realistic event fixtures and execute SAM local tests before cloud integration testing.
Question 594
A user edits a profile and the next request must see the committed change on the base table. The incident review finds the following problem: An eventually consistent read may briefly return a stale value after a successful write. What is the BEST targeted corrective action?
- Increase the item's TTL to force immediate visibility.
- Cache the previous response to obtain stronger consistency.
- Use ConsistentRead on a GSI Query and assume it is supported.
- Enable ConsistentRead on the supported table or LSI read path rather than a GSI.
Explanation
Correct Answer
D:Enable ConsistentRead on the supported table or LSI read path rather than a GSI. This directly addresses the recorded DynamoDB strong read consistency failure and should be checked by observing that an immediate post-write read returns the latest committed item in the supported read path.
Incorrect Answers
A:Increase the item's TTL to force immediate visibility. This does not repair the identified DynamoDB strong read consistency failure; the targeted remediation is to enable ConsistentRead on the supported table or LSI read path rather than a GSI.
B:Cache the previous response to obtain stronger consistency. This does not repair the identified DynamoDB strong read consistency failure; the targeted remediation is to enable ConsistentRead on the supported table or LSI read path rather than a GSI.
C:Use ConsistentRead on a GSI Query and assume it is supported. This does not repair the identified DynamoDB strong read consistency failure; the targeted remediation is to enable ConsistentRead on the supported table or LSI read path rather than a GSI.
Question 595
A scheduled Lambda writes objects to a single S3 bucket and its role is missing PutObject. The incident review finds the following problem: The execution role lacks a required resource permission and AWS denies the API call. What is the BEST targeted corrective action?
- Grant public bucket access to fix an IAM role policy.
- Embed a permanent administrator access key in source code.
- Change the Lambda handler name without checking permissions.
- Add the exact missing IAM action and resource scope to the execution role.
Explanation
Correct Answer
D:Add the exact missing IAM action and resource scope to the execution role. This directly addresses the recorded Lambda execution role least privilege failure and should be checked by observing that cloudTrail or SDK results confirm the expected action succeeds while unrelated resources remain denied.
Incorrect Answers
A:Grant public bucket access to fix an IAM role policy. This does not repair the identified Lambda execution role least privilege failure; the targeted remediation is to add the exact missing IAM action and resource scope to the execution role.
B:Embed a permanent administrator access key in source code. This does not repair the identified Lambda execution role least privilege failure; the targeted remediation is to add the exact missing IAM action and resource scope to the execution role.
C:Change the Lambda handler name without checking permissions. This does not repair the identified Lambda execution role least privilege failure; the targeted remediation is to add the exact missing IAM action and resource scope to the execution role.
Question 596
An ECS workload pulls an image built only for a CPU platform the target tasks do not support. The incident review finds the following problem: An architecture mismatch can prevent image startup even when application source is valid. What is the BEST targeted corrective action?
- Assume all OCI image manifests work on every CPU architecture.
- Change the API Gateway stage to arm64 without changing the image.
- Reduce load-balancer health-check frequency to repair an executable-format error.
- Rebuild for the intended platform and point the deployment to the compatible immutable digest.
Explanation
Correct Answer
D:Rebuild for the intended platform and point the deployment to the compatible immutable digest. This directly addresses the recorded container image architecture compatibility failure and should be checked by observing that the image manifest and a deployed smoke test match the target compute architecture.
Incorrect Answers
A:Assume all OCI image manifests work on every CPU architecture. This does not repair the identified container image architecture compatibility failure; the targeted remediation is to rebuild for the intended platform and point the deployment to the compatible immutable digest.
B:Change the API Gateway stage to arm64 without changing the image. This does not repair the identified container image architecture compatibility failure; the targeted remediation is to rebuild for the intended platform and point the deployment to the compatible immutable digest.
C:Reduce load-balancer health-check frequency to repair an executable-format error. This does not repair the identified container image architecture compatibility failure; the targeted remediation is to rebuild for the intended platform and point the deployment to the compatible immutable digest.
Question 597
A media job runs longer than its SQS visibility timeout and two consumers start identical transcoding tasks. The incident review finds the following problem: A too-short visibility timeout lets another consumer receive unfinished work. What is the BEST targeted corrective action?
- Rely on process memory to mark every SQS message complete.
- Extend or configure visibility to cover processing time and delete only after success.
- Remove DeleteMessage calls entirely.
- Reduce the visibility timeout to one second.
Explanation
Correct Answer
B:Extend or configure visibility to cover processing time and delete only after success. This directly addresses the recorded SQS visibility timeout failure and should be checked by observing that no second delivery occurs during the normal work interval and a completed message is explicitly deleted.
Incorrect Answers
A:Rely on process memory to mark every SQS message complete. This does not repair the identified SQS visibility timeout failure; the targeted remediation is to extend or configure visibility to cover processing time and delete only after success.
C:Remove DeleteMessage calls entirely. This does not repair the identified SQS visibility timeout failure; the targeted remediation is to extend or configure visibility to cover processing time and delete only after success.
D:Reduce the visibility timeout to one second. This does not repair the identified SQS visibility timeout failure; the targeted remediation is to extend or configure visibility to cover processing time and delete only after success.
Question 598
A document index returns results quickly for exact terms but not for certain expensive aggregations. The incident review finds the following problem: Scaling only the API tier does not correct an expensive OpenSearch query pattern. What is the BEST targeted corrective action?
- Restrict expensive clauses or tune mappings based on query profiling and rerun load tests.
- Disable index refresh permanently without assessing search freshness.
- Move the query into a browser loop with more requests.
- Add unused DynamoDB read capacity to reduce OpenSearch shard work.
Explanation
Correct Answer
A:Restrict expensive clauses or tune mappings based on query profiling and rerun load tests. This directly addresses the recorded OpenSearch query performance profiling failure and should be checked by observing that profile output identifies the costly query phase and a revised query reduces latency under representative load.
Incorrect Answers
B:Disable index refresh permanently without assessing search freshness. This does not repair the identified OpenSearch query performance profiling failure; the targeted remediation is to restrict expensive clauses or tune mappings based on query profiling and rerun load tests.
C:Move the query into a browser loop with more requests. This does not repair the identified OpenSearch query performance profiling failure; the targeted remediation is to restrict expensive clauses or tune mappings based on query profiling and rerun load tests.
D:Add unused DynamoDB read capacity to reduce OpenSearch shard work. This does not repair the identified OpenSearch query performance profiling failure; the targeted remediation is to restrict expensive clauses or tune mappings based on query profiling and rerun load tests.
Question 599
A compliance job uses an existing symmetric customer-managed KMS key and must rotate cryptographic material for future encryptions. The incident review finds the following problem: Deleting the KMS key during rotation makes ciphertext inaccessible after deletion. What is the BEST targeted corrective action?
- Change the KMS key ID in every stored old ciphertext without re-encrypting.
- Delete the old key as soon as rotation is enabled.
- Store key material in an S3 public object as the rotation backup.
- Enable managed rotation without deleting a still-required key, and test decrypting old and new samples.
Explanation
Correct Answer
D:Enable managed rotation without deleting a still-required key, and test decrypting old and new samples. This directly addresses the recorded KMS rotation scope failure and should be checked by observing that older ciphertext remains decryptable using protected historical key material and new operations use current material.
Incorrect Answers
A:Change the KMS key ID in every stored old ciphertext without re-encrypting. This does not repair the identified KMS rotation scope failure; the targeted remediation is to enable managed rotation without deleting a still-required key, and test decrypting old and new samples.
B:Delete the old key as soon as rotation is enabled. This does not repair the identified KMS rotation scope failure; the targeted remediation is to enable managed rotation without deleting a still-required key, and test decrypting old and new samples.
C:Store key material in an S3 public object as the rotation backup. This does not repair the identified KMS rotation scope failure; the targeted remediation is to enable managed rotation without deleting a still-required key, and test decrypting old and new samples.
Question 600
A multi-tenant service needs to prevent an authenticated tenant from querying another tenant's keyspace. The incident review finds the following problem: Accepting a caller-supplied tenant key without validation enables cross-tenant record access. What is the BEST targeted corrective action?
- Compose query keys from the verified tenant identity and check authorization in the data access layer.
- Trust an unsigned request header as proof of ownership.
- Permit any valid user to choose any tenant partition key.
- Cache shared query results without a tenant-specific key.
Explanation
Correct Answer
A:Compose query keys from the verified tenant identity and check authorization in the data access layer. This directly addresses the recorded multi-tenant DynamoDB row isolation failure and should be checked by observing that authorized requests query only their tenant partition while cross-tenant requests are blocked.
Incorrect Answers
B:Trust an unsigned request header as proof of ownership. This does not repair the identified multi-tenant DynamoDB row isolation failure; the targeted remediation is to compose query keys from the verified tenant identity and check authorization in the data access layer.
C:Permit any valid user to choose any tenant partition key. This does not repair the identified multi-tenant DynamoDB row isolation failure; the targeted remediation is to compose query keys from the verified tenant identity and check authorization in the data access layer.
D:Cache shared query results without a tenant-specific key. This does not repair the identified multi-tenant DynamoDB row isolation failure; the targeted remediation is to compose query keys from the verified tenant identity and check authorization in the data access layer.