Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 58
Question 570
A deployment artifact should use the same IaC source but separate S3 bucket names by environment. The incident review finds the following problem: Hardcoding production resource names in a shared template can cause cross-environment collisions. What is the BEST targeted corrective action?
- Duplicate production secrets in template descriptions.
- Pass the correct parameter values and inspect the generated change set before execution.
- Change DNS cache time-to-live instead of template parameters.
- Hand-edit each deployed resource in the console after every commit.
Explanation
Correct Answer
B:Pass the correct parameter values and inspect the generated change set before execution. This directly addresses the recorded CloudFormation resource parameters failure and should be checked by observing that the change set shows the intended resource values for the selected environment without modifying source templates.
Incorrect Answers
A:Duplicate production secrets in template descriptions. This does not repair the identified CloudFormation resource parameters failure; the targeted remediation is to pass the correct parameter values and inspect the generated change set before execution.
C:Change DNS cache time-to-live instead of template parameters. This does not repair the identified CloudFormation resource parameters failure; the targeted remediation is to pass the correct parameter values and inspect the generated change set before execution.
D:Hand-edit each deployed resource in the console after every commit. This does not repair the identified CloudFormation resource parameters failure; the targeted remediation is to pass the correct parameter values and inspect the generated change set before execution.
Question 571
An ETL job reads SSE-KMS objects but sees AccessDenied despite having s3:GetObject. The incident review finds the following problem: A role allowed to GetObject but denied KMS Decrypt cannot read the plaintext. What is the BEST targeted corrective action?
- Make the object public to grant KMS Decrypt implicitly.
- Set a cache TTL on CloudFront to override KMS authorization.
- Add scoped kms:Decrypt access to the designated key alongside the S3 read permission.
- Change S3 object metadata without altering key permissions.
Explanation
Correct Answer
C:Add scoped kms:Decrypt access to the designated key alongside the S3 read permission. This directly addresses the recorded S3 SSE-KMS access failure and should be checked by observing that the object can be retrieved and decrypted by the approved principal without broad KMS rights.
Incorrect Answers
A:Make the object public to grant KMS Decrypt implicitly. This does not repair the identified S3 SSE-KMS access failure; the targeted remediation is to add scoped kms:Decrypt access to the designated key alongside the S3 read permission.
B:Set a cache TTL on CloudFront to override KMS authorization. This does not repair the identified S3 SSE-KMS access failure; the targeted remediation is to add scoped kms:Decrypt access to the designated key alongside the S3 read permission.
D:Change S3 object metadata without altering key permissions. This does not repair the identified S3 SSE-KMS access failure; the targeted remediation is to add scoped kms:Decrypt access to the designated key alongside the S3 read permission.
Question 572
A synchronous API frequently reaches its integration timeout despite a long Lambda function timeout. The incident review finds the following problem: A longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout. What is the BEST targeted corrective action?
- Set the Lambda function timeout to fifteen minutes and assume API Gateway waits equally long.
- Reduce synchronous work or move lengthy processing to an async request/status design and retest.
- Increase DynamoDB TTL to change HTTP integration deadlines.
- Add random retries to the front end with no timeout diagnosis.
Explanation
Correct Answer
B:Reduce synchronous work or move lengthy processing to an async request/status design and retest. This directly addresses the recorded API Gateway Lambda integration timeout failure and should be checked by observing that end-to-end traces show the integration completes under the configured limit without gateway timeouts.
Incorrect Answers
A:Set the Lambda function timeout to fifteen minutes and assume API Gateway waits equally long. This does not repair the identified API Gateway Lambda integration timeout failure; the targeted remediation is to reduce synchronous work or move lengthy processing to an async request/status design and retest.
C:Increase DynamoDB TTL to change HTTP integration deadlines. This does not repair the identified API Gateway Lambda integration timeout failure; the targeted remediation is to reduce synchronous work or move lengthy processing to an async request/status design and retest.
D:Add random retries to the front end with no timeout diagnosis. This does not repair the identified API Gateway Lambda integration timeout failure; the targeted remediation is to reduce synchronous work or move lengthy processing to an async request/status design and retest.
Question 573
A support incident needs all function log events associated with one failed customer request. The incident review finds the following problem: Searching broad unstructured text without a request key obscures the relevant failure path. What is the BEST targeted corrective action?
- Add stable correlation fields to logs and filter an Insights query by the affected request.
- Increase Lambda memory without examining any error evidence.
- Delete the error log group to restart the handler.
- Use S3 lifecycle deletion as a Logs Insights query filter.
Explanation
Correct Answer
A:Add stable correlation fields to logs and filter an Insights query by the affected request. This directly addresses the recorded CloudWatch Logs Insights root cause failure and should be checked by observing that the query isolates timestamps and the exact error records associated with the failed request.
Incorrect Answers
B:Increase Lambda memory without examining any error evidence. This does not repair the identified CloudWatch Logs Insights root cause failure; the targeted remediation is to add stable correlation fields to logs and filter an Insights query by the affected request.
C:Delete the error log group to restart the handler. This does not repair the identified CloudWatch Logs Insights root cause failure; the targeted remediation is to add stable correlation fields to logs and filter an Insights query by the affected request.
D:Use S3 lifecycle deletion as a Logs Insights query filter. This does not repair the identified CloudWatch Logs Insights root cause failure; the targeted remediation is to add stable correlation fields to logs and filter an Insights query by the affected request.
Question 574
A data parsing handler is configured with minimal memory and consumes high CPU time per request. The incident review finds the following problem: Simply reducing memory can raise duration and total cost for CPU-bound code. What is the BEST targeted corrective action?
- Reduce memory to the absolute minimum without benchmarking.
- Increase S3 bucket version retention to speed CPU operations.
- Tune memory with measured duration and cost instead of assuming minimum memory is cheapest.
- Add an API Gateway authorizer to increase Lambda CPU shares.
Explanation
Correct Answer
C:Tune memory with measured duration and cost instead of assuming minimum memory is cheapest. This directly addresses the recorded Lambda duration versus memory tradeoff failure and should be checked by observing that comparative load tests show latency and billed cost at the chosen memory setting.
Incorrect Answers
A:Reduce memory to the absolute minimum without benchmarking. This does not repair the identified Lambda duration versus memory tradeoff failure; the targeted remediation is to tune memory with measured duration and cost instead of assuming minimum memory is cheapest.
B:Increase S3 bucket version retention to speed CPU operations. This does not repair the identified Lambda duration versus memory tradeoff failure; the targeted remediation is to tune memory with measured duration and cost instead of assuming minimum memory is cheapest.
D:Add an API Gateway authorizer to increase Lambda CPU shares. This does not repair the identified Lambda duration versus memory tradeoff failure; the targeted remediation is to tune memory with measured duration and cost instead of assuming minimum memory is cheapest.
Question 575
A Node.js Lambda package cannot load its dependency because the build omitted node_modules. The incident review finds the following problem: Missing or wrongly packaged dependencies cause runtime import failures before handler logic runs. What is the BEST targeted corrective action?
- Change CloudWatch log retention to make modules importable.
- Increase function concurrency to install dependencies automatically.
- Rebuild the artifact with dependencies in correct paths and run an invocation smoke test.
- Put dependency names only in a deployment README.
Explanation
Correct Answer
C:Rebuild the artifact with dependencies in correct paths and run an invocation smoke test. This directly addresses the recorded Lambda deployment package dependencies failure and should be checked by observing that a deployment smoke test imports all required modules in the deployed Lambda runtime.
Incorrect Answers
A:Change CloudWatch log retention to make modules importable. This does not repair the identified Lambda deployment package dependencies failure; the targeted remediation is to rebuild the artifact with dependencies in correct paths and run an invocation smoke test.
B:Increase function concurrency to install dependencies automatically. This does not repair the identified Lambda deployment package dependencies failure; the targeted remediation is to rebuild the artifact with dependencies in correct paths and run an invocation smoke test.
D:Put dependency names only in a deployment README. This does not repair the identified Lambda deployment package dependencies failure; the targeted remediation is to rebuild the artifact with dependencies in correct paths and run an invocation smoke test.
Question 576
A developer must undo a failed deployment without overwriting published Lambda code. The incident review finds the following problem: Editing $LATEST does not necessarily change an alias pinned to a published version. What is the BEST targeted corrective action?
- Edit published version code in place as though it were mutable.
- Restore the alias routing weight or version target and validate handler metrics.
- Delete the previous healthy version before performing rollback.
- Change the deployment package filename while leaving the alias unchanged.
Explanation
Correct Answer
B:Restore the alias routing weight or version target and validate handler metrics. This directly addresses the recorded Lambda alias rollback failure and should be checked by observing that invocations through the alias immediately resolve to the prior version and error rates recover.
Incorrect Answers
A:Edit published version code in place as though it were mutable. This does not repair the identified Lambda alias rollback failure; the targeted remediation is to restore the alias routing weight or version target and validate handler metrics.
C:Delete the previous healthy version before performing rollback. This does not repair the identified Lambda alias rollback failure; the targeted remediation is to restore the alias routing weight or version target and validate handler metrics.
D:Change the deployment package filename while leaving the alias unchanged. This does not repair the identified Lambda alias rollback failure; the targeted remediation is to restore the alias routing weight or version target and validate handler metrics.
Question 577
A mobile app wants managed account registration, confirmation, and JWT access tokens for backend endpoints. The incident review finds the following problem: Confusing a user pool with an identity pool leaves the app without the expected login and user-directory flow. What is the BEST targeted corrective action?
- Publish unauthenticated API requests as sufficient proof of identity.
- Store all user passwords in Lambda environment variables.
- Configure a user pool app client and validate JWT claims in the application or authorizer.
- Use an identity pool alone as a password-based user directory.
Explanation
Correct Answer
C:Configure a user pool app client and validate JWT claims in the application or authorizer. This directly addresses the recorded Cognito user pool authentication failure and should be checked by observing that a successfully signed-in user receives correctly issued tokens whose signature, issuer, audience, and expiry validate.
Incorrect Answers
A:Publish unauthenticated API requests as sufficient proof of identity. This does not repair the identified Cognito user pool authentication failure; the targeted remediation is to configure a user pool app client and validate JWT claims in the application or authorizer.
B:Store all user passwords in Lambda environment variables. This does not repair the identified Cognito user pool authentication failure; the targeted remediation is to configure a user pool app client and validate JWT claims in the application or authorizer.
D:Use an identity pool alone as a password-based user directory. This does not repair the identified Cognito user pool authentication failure; the targeted remediation is to configure a user pool app client and validate JWT claims in the application or authorizer.
Question 578
A Kubernetes-style web service restarts unnecessarily when downstream readiness briefly fails. The incident review finds the following problem: A single strict probe for every purpose can create restart loops during transient dependency slowness. What is the BEST targeted corrective action?
- Return HTTP 200 for readiness before required dependencies initialize.
- Restart the process for every transient database read failure.
- Use CloudFront invalidation as a health probe for an ECS process.
- Implement distinct probe semantics and tune thresholds for startup and dependent-service behavior.
Explanation
Correct Answer
D:Implement distinct probe semantics and tune thresholds for startup and dependent-service behavior. This directly addresses the recorded readiness versus liveness checks failure and should be checked by observing that traffic reaches only ready tasks while a temporary dependency delay does not force needless process restarts.
Incorrect Answers
A:Return HTTP 200 for readiness before required dependencies initialize. This does not repair the identified readiness versus liveness checks failure; the targeted remediation is to implement distinct probe semantics and tune thresholds for startup and dependent-service behavior.
B:Restart the process for every transient database read failure. This does not repair the identified readiness versus liveness checks failure; the targeted remediation is to implement distinct probe semantics and tune thresholds for startup and dependent-service behavior.
C:Use CloudFront invalidation as a health probe for an ECS process. This does not repair the identified readiness versus liveness checks failure; the targeted remediation is to implement distinct probe semantics and tune thresholds for startup and dependent-service behavior.
Question 579
A service retrieves all activity records for one user partition within a date range. The incident review finds the following problem: Using Scan for a predictable partition lookup wastes read capacity and creates latency. What is the BEST targeted corrective action?
- Put the customer identifier only into an unused document attribute.
- Call BatchWriteItem to retrieve customer records.
- Filter a full-table Scan after reading every item.
- Use a key condition in Query and paginate results when needed.
Explanation
Correct Answer
D:Use a key condition in Query and paginate results when needed. This directly addresses the recorded DynamoDB Query versus Scan failure and should be checked by observing that read capacity and response results are limited to the target key range rather than the whole table.
Incorrect Answers
A:Put the customer identifier only into an unused document attribute. This does not repair the identified DynamoDB Query versus Scan failure; the targeted remediation is to use a key condition in Query and paginate results when needed.
B:Call BatchWriteItem to retrieve customer records. This does not repair the identified DynamoDB Query versus Scan failure; the targeted remediation is to use a key condition in Query and paginate results when needed.
C:Filter a full-table Scan after reading every item. This does not repair the identified DynamoDB Query versus Scan failure; the targeted remediation is to use a key condition in Query and paginate results when needed.
Question 580
An external tax service has a prolonged outage and checkout must degrade predictably. The incident review finds the following problem: Keeping all requests waiting for an unhealthy dependency exhausts caller concurrency. What is the BEST targeted corrective action?
- Remove every timeout from partner calls.
- Make the user interface responsible for restoring backend network connectivity.
- Open the breaker on the configured failure threshold and restore probes when the dependency recovers.
- Retry every failed request with zero delay forever.
Explanation
Correct Answer
C:Open the breaker on the configured failure threshold and restore probes when the dependency recovers. This directly addresses the recorded third-party circuit breaker failure and should be checked by observing that during a sustained fault, calls fail fast through the fallback and recover through controlled probes.
Incorrect Answers
A:Remove every timeout from partner calls. This does not repair the identified third-party circuit breaker failure; the targeted remediation is to open the breaker on the configured failure threshold and restore probes when the dependency recovers.
B:Make the user interface responsible for restoring backend network connectivity. This does not repair the identified third-party circuit breaker failure; the targeted remediation is to open the breaker on the configured failure threshold and restore probes when the dependency recovers.
D:Retry every failed request with zero delay forever. This does not repair the identified third-party circuit breaker failure; the targeted remediation is to open the breaker on the configured failure threshold and restore probes when the dependency recovers.