Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 59
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.
Question 581
An internal API returns user objects and needs role-specific masking of email and national identifiers. The incident review finds the following problem: Logging or returning raw records before masking exposes PII despite correct database encryption. What is the BEST targeted corrective action?
- Return all PII in JSON and rely on users not opening dev tools.
- Filter and mask sensitive fields in the server-side projection and test role-specific responses.
- Set an S3 lifecycle rule on the API response body.
- Hide fields only with CSS in the browser.
Explanation
Correct Answer
B:Filter and mask sensitive fields in the server-side projection and test role-specific responses. This directly addresses the recorded PII response field masking failure and should be checked by observing that requests from nonprivileged roles contain masked fields while approved roles get only permitted detail.
Incorrect Answers
A:Return all PII in JSON and rely on users not opening dev tools. This does not repair the identified PII response field masking failure; the targeted remediation is to filter and mask sensitive fields in the server-side projection and test role-specific responses.
C:Set an S3 lifecycle rule on the API response body. This does not repair the identified PII response field masking failure; the targeted remediation is to filter and mask sensitive fields in the server-side projection and test role-specific responses.
D:Hide fields only with CSS in the browser. This does not repair the identified PII response field masking failure; the targeted remediation is to filter and mask sensitive fields in the server-side projection and test role-specific responses.
Question 582
A CI stage builds a container and should fail before image publish if unit tests fail. The incident review finds the following problem: Packaging before test validation can promote artifacts containing known defects. What is the BEST targeted corrective action?
- Run tests before packaging and ensure nonzero failures stop the build.
- Upload artifacts before dependencies are installed.
- Use CodeDeploy health checks as a replacement for compiling source.
- Mark every test command with ignore-error behavior.
Explanation
Correct Answer
A:Run tests before packaging and ensure nonzero failures stop the build. This directly addresses the recorded CodeBuild buildspec sequencing failure and should be checked by observing that the build fails on a seeded test failure and publishes an artifact only after tests succeed.
Incorrect Answers
B:Upload artifacts before dependencies are installed. This does not repair the identified CodeBuild buildspec sequencing failure; the targeted remediation is to run tests before packaging and ensure nonzero failures stop the build.
C:Use CodeDeploy health checks as a replacement for compiling source. This does not repair the identified CodeBuild buildspec sequencing failure; the targeted remediation is to run tests before packaging and ensure nonzero failures stop the build.
D:Mark every test command with ignore-error behavior. This does not repair the identified CodeBuild buildspec sequencing failure; the targeted remediation is to run tests before packaging and ensure nonzero failures stop the build.
Question 583
An infrequently invoked Lambda spends most of its latency initializing libraries before its handler starts. The incident review finds the following problem: Optimizing only DynamoDB Query speed cannot eliminate time spent before the handler begins. What is the BEST targeted corrective action?
- Trim initialization imports or package size and benchmark provisioned concurrency if latency requires it.
- Store imported modules in an API Gateway stage variable.
- Increase SQS message retention to remove Lambda initialization.
- Disable CloudWatch logs to guarantee warm execution.
Explanation
Correct Answer
A:Trim initialization imports or package size and benchmark provisioned concurrency if latency requires it. This directly addresses the recorded Lambda Init Duration diagnosis failure and should be checked by observing that telemetry separates initialization delay from handler time and shows improvement after the change.
Incorrect Answers
B:Store imported modules in an API Gateway stage variable. This does not repair the identified Lambda Init Duration diagnosis failure; the targeted remediation is to trim initialization imports or package size and benchmark provisioned concurrency if latency requires it.
C:Increase SQS message retention to remove Lambda initialization. This does not repair the identified Lambda Init Duration diagnosis failure; the targeted remediation is to trim initialization imports or package size and benchmark provisioned concurrency if latency requires it.
D:Disable CloudWatch logs to guarantee warm execution. This does not repair the identified Lambda Init Duration diagnosis failure; the targeted remediation is to trim initialization imports or package size and benchmark provisioned concurrency if latency requires it.
Question 584
A worker fetches a sensitive connection string at startup without putting the value in source code. The incident review finds the following problem: A plaintext String parameter does not provide the intended encrypted-at-rest secret boundary. What is the BEST targeted corrective action?
- Put the secret in a plain CloudFormation output without protection.
- Store the encrypted string and its decryption key together in a public README.
- Migrate the sensitive value to SecureString and limit ssm:GetParameter plus KMS permissions.
- Print parameter contents to every startup log.
Explanation
Correct Answer
C:Migrate the sensitive value to SecureString and limit ssm:GetParameter plus KMS permissions. This directly addresses the recorded Parameter Store secure strings failure and should be checked by observing that authorized reads with decryption return the intended value while unauthorized callers cannot decrypt it.
Incorrect Answers
A:Put the secret in a plain CloudFormation output without protection. This does not repair the identified Parameter Store secure strings failure; the targeted remediation is to migrate the sensitive value to SecureString and limit ssm:GetParameter plus KMS permissions.
B:Store the encrypted string and its decryption key together in a public README. This does not repair the identified Parameter Store secure strings failure; the targeted remediation is to migrate the sensitive value to SecureString and limit ssm:GetParameter plus KMS permissions.
D:Print parameter contents to every startup log. This does not repair the identified Parameter Store secure strings failure; the targeted remediation is to migrate the sensitive value to SecureString and limit ssm:GetParameter plus KMS permissions.
Question 585
A developer wants to filter traces by environment and operation while attaching detailed diagnostic context. The incident review finds the following problem: Putting sensitive free-form payloads in indexed annotations creates exposure and high-cardinality filtering problems. What is the BEST targeted corrective action?
- Store full access tokens as trace annotations.
- Disable tracing to avoid specifying safe fields.
- Move diagnostic detail to appropriately protected metadata and use safe annotation keys.
- Put all filterable dimensions only into unindexed metadata.
Explanation
Correct Answer
C:Move diagnostic detail to appropriately protected metadata and use safe annotation keys. This directly addresses the recorded tracing annotations versus metadata failure and should be checked by observing that trace searches filter by annotations without exposing private payloads as indexed labels.
Incorrect Answers
A:Store full access tokens as trace annotations. This does not repair the identified tracing annotations versus metadata failure; the targeted remediation is to move diagnostic detail to appropriately protected metadata and use safe annotation keys.
B:Disable tracing to avoid specifying safe fields. This does not repair the identified tracing annotations versus metadata failure; the targeted remediation is to move diagnostic detail to appropriately protected metadata and use safe annotation keys.
D:Put all filterable dimensions only into unindexed metadata. This does not repair the identified tracing annotations versus metadata failure; the targeted remediation is to move diagnostic detail to appropriately protected metadata and use safe annotation keys.
Question 586
An SDK request passes S3 authorization but fails at KMS decrypt during an export download. The incident review finds the following problem: Only adjusting s3:GetObject cannot fix an explicit KMS decrypt denial. What is the BEST targeted corrective action?
- Fix the narrow missing key or IAM authorization and rerun the same request.
- Assume successful TCP connectivity proves encryption authorization.
- Turn off all application logging before testing policies.
- Rename the S3 key without reviewing the KMS failure.
Explanation
Correct Answer
A:Fix the narrow missing key or IAM authorization and rerun the same request. This directly addresses the recorded AccessDenied troubleshooting chain failure and should be checked by observing that the denied API event identifies the principal and missing permission or key-policy condition.
Incorrect Answers
B:Assume successful TCP connectivity proves encryption authorization. This does not repair the identified AccessDenied troubleshooting chain failure; the targeted remediation is to fix the narrow missing key or IAM authorization and rerun the same request.
C:Turn off all application logging before testing policies. This does not repair the identified AccessDenied troubleshooting chain failure; the targeted remediation is to fix the narrow missing key or IAM authorization and rerun the same request.
D:Rename the S3 key without reviewing the KMS failure. This does not repair the identified AccessDenied troubleshooting chain failure; the targeted remediation is to fix the narrow missing key or IAM authorization and rerun the same request.
Question 587
An event-driven worker retries DynamoDB writes heavily during a predictable product launch. The incident review finds the following problem: Assuming every throttle is a client DNS issue misses partition and capacity evidence. What is the BEST targeted corrective action?
- Address hot-key distribution or capacity and use bounded backoff with jitter.
- Disable all DynamoDB retry handling permanently.
- Grant the API role AdministratorAccess as the only throttling fix.
- Increase CloudFront TTL to change a DynamoDB partition key.
Explanation
Correct Answer
A:Address hot-key distribution or capacity and use bounded backoff with jitter. This directly addresses the recorded DynamoDB throttling investigation failure and should be checked by observing that metrics and request logs identify concentrated key traffic or exhausted write/read capacity.
Incorrect Answers
B:Disable all DynamoDB retry handling permanently. This does not repair the identified DynamoDB throttling investigation failure; the targeted remediation is to address hot-key distribution or capacity and use bounded backoff with jitter.
C:Grant the API role AdministratorAccess as the only throttling fix. This does not repair the identified DynamoDB throttling investigation failure; the targeted remediation is to address hot-key distribution or capacity and use bounded backoff with jitter.
D:Increase CloudFront TTL to change a DynamoDB partition key. This does not repair the identified DynamoDB throttling investigation failure; the targeted remediation is to address hot-key distribution or capacity and use bounded backoff with jitter.
Question 588
A support dashboard receives a valid token for tenant A and must not let it request tenant B's records. The incident review finds the following problem: Treating any valid JWT as permission to read arbitrary tenant IDs leaks cross-tenant data. What is the BEST targeted corrective action?
- Compare verified tenant claims with record ownership and reject mismatches before data access.
- Trust a caller-supplied tenantId query parameter without checking claims.
- Put tenant identity only in an unverified browser cookie.
- Disable row filters for all logged-in users.
Explanation
Correct Answer
A:Compare verified tenant claims with record ownership and reject mismatches before data access. This directly addresses the recorded application tenant authorization failure and should be checked by observing that cross-tenant requests receive an authorization failure even with otherwise valid login tokens.
Incorrect Answers
B:Trust a caller-supplied tenantId query parameter without checking claims. This does not repair the identified application tenant authorization failure; the targeted remediation is to compare verified tenant claims with record ownership and reject mismatches before data access.
C:Put tenant identity only in an unverified browser cookie. This does not repair the identified application tenant authorization failure; the targeted remediation is to compare verified tenant claims with record ownership and reject mismatches before data access.
D:Disable row filters for all logged-in users. This does not repair the identified application tenant authorization failure; the targeted remediation is to compare verified tenant claims with record ownership and reject mismatches before data access.
Question 589
An internal REST API needs to deny requests outside approved network-origin conditions. The incident review finds the following problem: Omitting the source restriction can leave a supposedly internal API exposed to more callers. What is the BEST targeted corrective action?
- Set a low throttling burst rate to block unauthorized networks.
- Scope the resource-policy condition to the intended VPC endpoint and test negative cases.
- Configure CORS headers as the only network access restriction.
- Rely on endpoint naming conventions without a resource policy.
Explanation
Correct Answer
B:Scope the resource-policy condition to the intended VPC endpoint and test negative cases. This directly addresses the recorded API Gateway resource policy failure and should be checked by observing that requests from the intended endpoint succeed and other source contexts receive access denied.
Incorrect Answers
A:Set a low throttling burst rate to block unauthorized networks. This does not repair the identified API Gateway resource policy failure; the targeted remediation is to scope the resource-policy condition to the intended VPC endpoint and test negative cases.
C:Configure CORS headers as the only network access restriction. This does not repair the identified API Gateway resource policy failure; the targeted remediation is to scope the resource-policy condition to the intended VPC endpoint and test negative cases.
D:Rely on endpoint naming conventions without a resource policy. This does not repair the identified API Gateway resource policy failure; the targeted remediation is to scope the resource-policy condition to the intended VPC endpoint and test negative cases.
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.