Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 56
Question 550
A team rolls out a pricing feature to only a small subset of users with rollback controls. The incident review finds the following problem: Copying production flags into staging accidentally enables functionality in the wrong environment. What is the BEST targeted corrective action?
- Store feature flags in an unvalidated browser cookie only.
- Rely on IAM key rotation to change application feature behavior.
- Commit different copies of the application for every flag value.
- Correct the AppConfig environment or profile association and roll back unsafe versions.
Explanation
Correct Answer
D:Correct the AppConfig environment or profile association and roll back unsafe versions. This directly addresses the recorded environment-specific AppConfig failure and should be checked by observing that the correct environment retrieves its scoped configuration and a failed rollout can be rolled back.
Incorrect Answers
A:Store feature flags in an unvalidated browser cookie only. This does not repair the identified environment-specific AppConfig failure; the targeted remediation is to correct the AppConfig environment or profile association and roll back unsafe versions.
B:Rely on IAM key rotation to change application feature behavior. This does not repair the identified environment-specific AppConfig failure; the targeted remediation is to correct the AppConfig environment or profile association and roll back unsafe versions.
C:Commit different copies of the application for every flag value. This does not repair the identified environment-specific AppConfig failure; the targeted remediation is to correct the AppConfig environment or profile association and roll back unsafe versions.
Question 551
A team needs to deploy a shared Node.js utility library with several separate Lambda handlers. The incident review finds the following problem: A layer built for a different runtime or architecture can cause module import failures. What is the BEST targeted corrective action?
- Attach the layer without checking runtime or architecture compatibility.
- Use an API Gateway mapping template to install native Python packages.
- Rebuild the layer for the deployed runtime and pin a tested layer version.
- Put the dependency archive in CloudWatch Logs expecting Lambda to import it.
Explanation
Correct Answer
C:Rebuild the layer for the deployed runtime and pin a tested layer version. This directly addresses the recorded Lambda layer dependency management failure and should be checked by observing that each function loads the expected dependency version under the declared runtime and architecture.
Incorrect Answers
A:Attach the layer without checking runtime or architecture compatibility. This does not repair the identified Lambda layer dependency management failure; the targeted remediation is to rebuild the layer for the deployed runtime and pin a tested layer version.
B:Use an API Gateway mapping template to install native Python packages. This does not repair the identified Lambda layer dependency management failure; the targeted remediation is to rebuild the layer for the deployed runtime and pin a tested layer version.
D:Put the dependency archive in CloudWatch Logs expecting Lambda to import it. This does not repair the identified Lambda layer dependency management failure; the targeted remediation is to rebuild the layer for the deployed runtime and pin a tested layer version.
Question 552
A service stores a partner API credential and needs controlled update and audited retrieval. The incident review finds the following problem: A long-lived credential hardcoded into a container image stays stale after rotation. What is the BEST targeted corrective action?
- Retrieve the current secret securely, refresh caches on rotation, and audit permission scope.
- Commit rotated passwords to the Git repository.
- Use a plaintext build log as the secret vault.
- Require customers to read the secret from a public URL.
Explanation
Correct Answer
A:Retrieve the current secret securely, refresh caches on rotation, and audit permission scope. This directly addresses the recorded Secrets Manager rotation failure and should be checked by observing that rotated secret versions become available to authorized consumers and the application refreshes its cached credential.
Incorrect Answers
B:Commit rotated passwords to the Git repository. This does not repair the identified Secrets Manager rotation failure; the targeted remediation is to retrieve the current secret securely, refresh caches on rotation, and audit permission scope.
C:Use a plaintext build log as the secret vault. This does not repair the identified Secrets Manager rotation failure; the targeted remediation is to retrieve the current secret securely, refresh caches on rotation, and audit permission scope.
D:Require customers to read the secret from a public URL. This does not repair the identified Secrets Manager rotation failure; the targeted remediation is to retrieve the current secret securely, refresh caches on rotation, and audit permission scope.
Question 553
An SQS-triggered Lambda handles batches of invoice messages with one malformed item. The incident review finds the following problem: Raising an exception for the whole batch makes the entire batch eligible for retry. What is the BEST targeted corrective action?
- Mark every batch entry failed to preserve one error.
- Return batchItemFailures for the unsuccessful message IDs and correct the payload handler.
- Increase API Gateway rate limits to control SQS batch acknowledgements.
- Delete the full SQS queue when one record fails.
Explanation
Correct Answer
B:Return batchItemFailures for the unsuccessful message IDs and correct the payload handler. This directly addresses the recorded Lambda event source partial batch response failure and should be checked by observing that only failed message IDs are retried while acknowledged batch records remain completed.
Incorrect Answers
A:Mark every batch entry failed to preserve one error. This does not repair the identified Lambda event source partial batch response failure; the targeted remediation is to return batchItemFailures for the unsuccessful message IDs and correct the payload handler.
C:Increase API Gateway rate limits to control SQS batch acknowledgements. This does not repair the identified Lambda event source partial batch response failure; the targeted remediation is to return batchItemFailures for the unsuccessful message IDs and correct the payload handler.
D:Delete the full SQS queue when one record fails. This does not repair the identified Lambda event source partial batch response failure; the targeted remediation is to return batchItemFailures for the unsuccessful message IDs and correct the payload handler.
Question 554
A developer asks an AI assistant to generate edge-case fixtures for a new API payload. The incident review finds the following problem: An AI test that only checks process exit can pass while functional behavior is wrong. What is the BEST targeted corrective action?
- Add concrete correctness assertions and review fixtures before merging generated tests.
- Disable code review because test source was AI-generated.
- Commit customer secrets as fixtures to improve realism.
- Assume generated tests always cover every production edge case.
Explanation
Correct Answer
A:Add concrete correctness assertions and review fixtures before merging generated tests. This directly addresses the recorded AI-assisted test review failure and should be checked by observing that the accepted tests fail on a known bug and pass once the defect is fixed without leaking secrets.
Incorrect Answers
B:Disable code review because test source was AI-generated. This does not repair the identified AI-assisted test review failure; the targeted remediation is to add concrete correctness assertions and review fixtures before merging generated tests.
C:Commit customer secrets as fixtures to improve realism. This does not repair the identified AI-assisted test review failure; the targeted remediation is to add concrete correctness assertions and review fixtures before merging generated tests.
D:Assume generated tests always cover every production edge case. This does not repair the identified AI-assisted test review failure; the targeted remediation is to add concrete correctness assertions and review fixtures before merging generated tests.
Question 555
A CDN caches a public product listing that differs according to a small set of approved request headers. The incident review finds the following problem: Ignoring a response-varying header can serve incorrect or sensitive content from cache. What is the BEST targeted corrective action?
- Add the supported header or parameter to the cache key and prevent private responses from shared caching.
- Disable origin validation and accept all cached variants.
- Cache every authenticated response under one key.
- Set all Cache-Control headers to public for private account responses.
Explanation
Correct Answer
A:Add the supported header or parameter to the cache key and prevent private responses from shared caching. This directly addresses the recorded API response caching variation failure and should be checked by observing that cache tests show each allowed variant returns its own response without cross-user leakage.
Incorrect Answers
B:Disable origin validation and accept all cached variants. This does not repair the identified API response caching variation failure; the targeted remediation is to add the supported header or parameter to the cache key and prevent private responses from shared caching.
C:Cache every authenticated response under one key. This does not repair the identified API response caching variation failure; the targeted remediation is to add the supported header or parameter to the cache key and prevent private responses from shared caching.
D:Set all Cache-Control headers to public for private account responses. This does not repair the identified API response caching variation failure; the targeted remediation is to add the supported header or parameter to the cache key and prevent private responses from shared caching.
Question 556
A background Lambda invoked asynchronously exhausts its retries and should preserve a failure record. The incident review finds the following problem: A missing destination silently loses terminal failure context beyond default handling. What is the BEST targeted corrective action?
- Configure a synchronous API Gateway response header as an async destination.
- Delete application logs to reduce retry errors.
- Add a permitted destination and inspect the failure record together with retry settings.
- Increase provisioned concurrency to guarantee application correctness.
Explanation
Correct Answer
C:Add a permitted destination and inspect the failure record together with retry settings. This directly addresses the recorded Lambda asynchronous failure destination failure and should be checked by observing that the failure destination receives an invocation record after retries or age limits are exhausted.
Incorrect Answers
A:Configure a synchronous API Gateway response header as an async destination. This does not repair the identified Lambda asynchronous failure destination failure; the targeted remediation is to add a permitted destination and inspect the failure record together with retry settings.
B:Delete application logs to reduce retry errors. This does not repair the identified Lambda asynchronous failure destination failure; the targeted remediation is to add a permitted destination and inspect the failure record together with retry settings.
D:Increase provisioned concurrency to guarantee application correctness. This does not repair the identified Lambda asynchronous failure destination failure; the targeted remediation is to add a permitted destination and inspect the failure record together with retry settings.
Question 557
A job encrypts multi-megabyte objects and needs controlled decryption by approved services. The incident review finds the following problem: Sending large documents directly through a small KMS Encrypt API payload is unsuitable. What is the BEST targeted corrective action?
- Hardcode a plaintext symmetric key in source control.
- Use a protected KMS key to wrap a random data key and rotate data keys for new payloads.
- Use Base64 encoding and call it encryption.
- Log plaintext generated data keys for debugging.
Explanation
Correct Answer
B:Use a protected KMS key to wrap a random data key and rotate data keys for new payloads. This directly addresses the recorded KMS envelope encryption failure and should be checked by observing that an approved role can decrypt the wrapped data key while an unauthorized role cannot.
Incorrect Answers
A:Hardcode a plaintext symmetric key in source control. This does not repair the identified KMS envelope encryption failure; the targeted remediation is to use a protected KMS key to wrap a random data key and rotate data keys for new payloads.
C:Use Base64 encoding and call it encryption. This does not repair the identified KMS envelope encryption failure; the targeted remediation is to use a protected KMS key to wrap a random data key and rotate data keys for new payloads.
D:Log plaintext generated data keys for debugging. This does not repair the identified KMS envelope encryption failure; the targeted remediation is to use a protected KMS key to wrap a random data key and rotate data keys for new payloads.
Question 558
An application principal has matching resource access but an explicit deny in its policy boundary. The incident review finds the following problem: Adding another Allow statement does not override an explicit Deny. What is the BEST targeted corrective action?
- Disable CloudTrail to make denied API calls succeed.
- Rename the role without inspecting policy statements.
- Attach an additional wildcard Allow to override every Deny.
- Remove or narrow the applicable explicit-deny condition with proper authorization and retest.
Explanation
Correct Answer
D:Remove or narrow the applicable explicit-deny condition with proper authorization and retest. This directly addresses the recorded IAM policy explicit deny failure and should be checked by observing that policy evaluation identifies a matching explicit deny even though an Allow statement also matches.
Incorrect Answers
A:Disable CloudTrail to make denied API calls succeed. This does not repair the identified IAM policy explicit deny failure; the targeted remediation is to remove or narrow the applicable explicit-deny condition with proper authorization and retest.
B:Rename the role without inspecting policy statements. This does not repair the identified IAM policy explicit deny failure; the targeted remediation is to remove or narrow the applicable explicit-deny condition with proper authorization and retest.
C:Attach an additional wildcard Allow to override every Deny. This does not repair the identified IAM policy explicit deny failure; the targeted remediation is to remove or narrow the applicable explicit-deny condition with proper authorization and retest.
Question 559
A streaming application needs per-customer record order while spreading load across independent partitions. The incident review finds the following problem: Using one constant partition key creates a hot shard even when more shards are available. What is the BEST targeted corrective action?
- Publish all records with a single literal partition key.
- Select high-cardinality entity partition keys and adjust shard capacity or consumption mode after monitoring.
- Expect global order across unrelated shards.
- Store streaming checkpoints in browser cookies.
Explanation
Correct Answer
B:Select high-cardinality entity partition keys and adjust shard capacity or consumption mode after monitoring. This directly addresses the recorded Kinesis shard partitioning failure and should be checked by observing that records for one entity remain ordered while shard-level incoming and processing rates stay within quotas.
Incorrect Answers
A:Publish all records with a single literal partition key. This does not repair the identified Kinesis shard partitioning failure; the targeted remediation is to select high-cardinality entity partition keys and adjust shard capacity or consumption mode after monitoring.
C:Expect global order across unrelated shards. This does not repair the identified Kinesis shard partitioning failure; the targeted remediation is to select high-cardinality entity partition keys and adjust shard capacity or consumption mode after monitoring.
D:Store streaming checkpoints in browser cookies. This does not repair the identified Kinesis shard partitioning failure; the targeted remediation is to select high-cardinality entity partition keys and adjust shard capacity or consumption mode after monitoring.
Question 560
An order-created event must reach separate inventory and loyalty queues even when one consumer is offline. The incident review finds the following problem: Invoking each downstream worker synchronously couples availability and latency. What is the BEST targeted corrective action?
- Store all consumer tasks in one local thread.
- Send events to one shared SQS queue expecting every consumer to see every event.
- Call each worker inside one HTTP request.
- Give each consumer its own SQS subscription and allow workers to retry independently.
Explanation
Correct Answer
D:Give each consumer its own SQS subscription and allow workers to retry independently. This directly addresses the recorded SNS fanout delivery failure and should be checked by observing that each subscriber queue receives its own copy and an unavailable worker can process its backlog later.
Incorrect Answers
A:Store all consumer tasks in one local thread. This does not repair the identified SNS fanout delivery failure; the targeted remediation is to give each consumer its own SQS subscription and allow workers to retry independently.
B:Send events to one shared SQS queue expecting every consumer to see every event. This does not repair the identified SNS fanout delivery failure; the targeted remediation is to give each consumer its own SQS subscription and allow workers to retry independently.
C:Call each worker inside one HTTP request. This does not repair the identified SNS fanout delivery failure; the targeted remediation is to give each consumer its own SQS subscription and allow workers to retry independently.