Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 63
Question 620
A support representative can view order state but must not see full customer identity numbers. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Hide fields only with CSS in the browser.
- Apply field-level authorization and mask sensitive attributes before serializing responses.
- Set an S3 lifecycle rule on the API response body.
- Return all PII in JSON and rely on users not opening dev tools.
- Requests from nonprivileged roles contain masked fields while approved roles get only permitted detail.
Explanation
Correct Answers
B:Apply field-level authorization and mask sensitive attributes before serializing responses. This is the concrete implementation required for PII response field masking.
E:Requests from nonprivileged roles contain masked fields while approved roles get only permitted detail.
Incorrect Answers
A:Hide fields only with CSS in the browser. This is not a suitable implementation or validation step for PII response field masking; it would leave the risk that logging or returning raw records before masking exposes PII despite correct database encryption.
C:Set an S3 lifecycle rule on the API response body. This is not a suitable implementation or validation step for PII response field masking; it would leave the risk that logging or returning raw records before masking exposes PII despite correct database encryption.
D:Return all PII in JSON and rely on users not opening dev tools. This is not a suitable implementation or validation step for PII response field masking; it would leave the risk that logging or returning raw records before masking exposes PII despite correct database encryption.
Question 621
A Lambda zip deployment fails at initialization with No module named requests. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Build the deployment archive with runtime-compatible dependencies at the expected package paths.
- Increase function concurrency to install dependencies automatically.
- Change CloudWatch log retention to make modules importable.
- A deployment smoke test imports all required modules in the deployed Lambda runtime.
- Put dependency names only in a deployment README.
Explanation
Correct Answers
A:Build the deployment archive with runtime-compatible dependencies at the expected package paths. This is the concrete implementation required for Lambda deployment package dependencies.
D:A deployment smoke test imports all required modules in the deployed Lambda runtime. This is the workload-specific evidence needed to validate the change.
Incorrect Answers
B:Increase function concurrency to install dependencies automatically. This is not a suitable implementation or validation step for Lambda deployment package dependencies; it would leave the risk that missing or wrongly packaged dependencies cause runtime import failures before handler logic runs.
C:Change CloudWatch log retention to make modules importable. This is not a suitable implementation or validation step for Lambda deployment package dependencies; it would leave the risk that missing or wrongly packaged dependencies cause runtime import failures before handler logic runs.
E:Put dependency names only in a deployment README. This is not a suitable implementation or validation step for Lambda deployment package dependencies; it would leave the risk that missing or wrongly packaged dependencies cause runtime import failures before handler logic runs.
Question 622
A team needs to test v2 of an API while consumers still use the production stage. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Point every test client at production without a stage boundary.
- Treat API custom-domain DNS as a replacement for deployed stages.
- Deploy API changes to an isolated API Gateway stage with stage-specific configuration.
- Delete the API deployment after each individual request.
- Test requests route to the test deployment while production routes keep serving the previous version.
Explanation
Correct Answers
C:Deploy API changes to an isolated API Gateway stage with stage-specific configuration. This is the concrete implementation required for API Gateway staging endpoints.
E:Test requests route to the test deployment while production routes keep serving the previous version.
Incorrect Answers
A:Point every test client at production without a stage boundary. This is not a suitable implementation or validation step for API Gateway staging endpoints; it would leave the risk that updating the production stage for every test exposes incomplete behavior to consumers.
B:Treat API custom-domain DNS as a replacement for deployed stages. This is not a suitable implementation or validation step for API Gateway staging endpoints; it would leave the risk that updating the production stage for every test exposes incomplete behavior to consumers.
D:Delete the API deployment after each individual request. This is not a suitable implementation or validation step for API Gateway staging endpoints; it would leave the risk that updating the production stage for every test exposes incomplete behavior to consumers.
Question 623
A mobile client must gracefully recover when a short-lived OAuth access token expires. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Encode a username in base64 and treat it as a JWT.
- The client obtains a fresh access token and the protected API rejects an expired one.
- Set access tokens to never expire because users dislike sign-in.
- Accept tokens without verifying their signature.
- Validate token expiry and use the provider's supported refresh flow rather than accepting expired tokens.
Explanation
Correct Answers
B:The client obtains a fresh access token and the protected API rejects an expired one. This is the workload-specific evidence needed to validate the change.
E:Validate token expiry and use the provider's supported refresh flow rather than accepting expired tokens. This is the concrete implementation required for bearer token refresh and expiry.
Incorrect Answers
A:Encode a username in base64 and treat it as a JWT. This is not a suitable implementation or validation step for bearer token refresh and expiry; it would leave the risk that ignoring exp claims leaves a path for stale tokens to be reused as authorization.
C:Set access tokens to never expire because users dislike sign-in. This is not a suitable implementation or validation step for bearer token refresh and expiry; it would leave the risk that ignoring exp claims leaves a path for stale tokens to be reused as authorization.
D:Accept tokens without verifying their signature. This is not a suitable implementation or validation step for bearer token refresh and expiry; it would leave the risk that ignoring exp claims leaves a path for stale tokens to be reused as authorization.
Question 624
A Lambda function reads customer profiles from one DynamoDB table but receives AccessDenied for GetItem. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Change the Lambda handler name without checking permissions.
- Embed a permanent administrator access key in source code.
- Grant public bucket access to fix an IAM role policy.
- Attach a least-privilege policy to the Lambda execution role for the required API actions and resource ARN.
- CloudTrail or SDK results confirm the expected action succeeds while unrelated resources remain denied.
Explanation
Correct Answers
D:Attach a least-privilege policy to the Lambda execution role for the required API actions and resource ARN. This is the concrete implementation required for Lambda execution role least privilege.
E:CloudTrail or SDK results confirm the expected action succeeds while unrelated resources remain denied.
Incorrect Answers
A:Change the Lambda handler name without checking permissions. This is not a suitable implementation or validation step for Lambda execution role least privilege; it would leave the risk that the execution role lacks a required resource permission and AWS denies the API call.
B:Embed a permanent administrator access key in source code. This is not a suitable implementation or validation step for Lambda execution role least privilege; it would leave the risk that the execution role lacks a required resource permission and AWS denies the API call.
C:Grant public bucket access to fix an IAM role policy. This is not a suitable implementation or validation step for Lambda execution role least privilege; it would leave the risk that the execution role lacks a required resource permission and AWS denies the API call.
Question 625
An asynchronous Lambda must preserve request and response context when a job ultimately fails. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Replace async destinations with S3 object versioning.
- Use a Lambda asynchronous failure destination for an invocation record instead of relying solely on a DLQ.
- The target receives a record including request details and failure response context.
- Use Lambda destinations for each synchronous SDK invocation without wrapping.
- Drop the event after the first retry without a failure sink.
Explanation
Correct Answers
B:Use a Lambda asynchronous failure destination for an invocation record instead of relying solely on a DLQ. This is the concrete implementation required for Lambda destinations versus DLQ.
C:The target receives a record including request details and failure response context. This is the workload-specific evidence needed to validate the change.
Incorrect Answers
A:Replace async destinations with S3 object versioning. This is not a suitable implementation or validation step for Lambda destinations versus DLQ; it would leave the risk that treating an async DLQ as a complete execution trace omits response context.
D:Use Lambda destinations for each synchronous SDK invocation without wrapping. This is not a suitable implementation or validation step for Lambda destinations versus DLQ; it would leave the risk that treating an async DLQ as a complete execution trace omits response context.
E:Drop the event after the first retry without a failure sink. This is not a suitable implementation or validation step for Lambda destinations versus DLQ; it would leave the risk that treating an async DLQ as a complete execution trace omits response context.
Question 626
A public booking endpoint must reject missing required request fields before invoking backend business logic. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Configure an API Gateway request validator and matching request model for required JSON structure.
- Increase backend memory to handle missing JSON keys.
- Malformed requests produce a client error before backend invocation while valid requests reach the integration.
- Move schema validation exclusively into CloudWatch alarms.
- Expose an unrestricted mock integration to all clients.
Explanation
Correct Answers
A:Configure an API Gateway request validator and matching request model for required JSON structure. This is the concrete implementation required for API Gateway request validation.
C:Malformed requests produce a client error before backend invocation while valid requests reach the integration.
Incorrect Answers
B:Increase backend memory to handle missing JSON keys. This is not a suitable implementation or validation step for API Gateway request validation; it would leave the risk that missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
D:Move schema validation exclusively into CloudWatch alarms. This is not a suitable implementation or validation step for API Gateway request validation; it would leave the risk that missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
E:Expose an unrestricted mock integration to all clients. This is not a suitable implementation or validation step for API Gateway request validation; it would leave the risk that missing or incomplete request models let invalid payloads reach Lambda and trigger runtime exceptions.
Question 627
An API connects to RDS with a password that must rotate without a source-code change. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Require customers to read the secret from a public URL.
- Store the secret in Secrets Manager and use a supported rotation workflow with least-privilege GetSecretValue.
- Commit rotated passwords to the Git repository.
- Rotated secret versions become available to authorized consumers and the application refreshes its cached credential.
- Use a plaintext build log as the secret vault.
Explanation
Correct Answers
B:Store the secret in Secrets Manager and use a supported rotation workflow with least-privilege GetSecretValue. This is the concrete implementation required for Secrets Manager rotation.
D:Rotated secret versions become available to authorized consumers and the application refreshes its cached credential.
Incorrect Answers
A:Require customers to read the secret from a public URL. This is not a suitable implementation or validation step for Secrets Manager rotation; it would leave the risk that a long-lived credential hardcoded into a container image stays stale after rotation.
C:Commit rotated passwords to the Git repository. This is not a suitable implementation or validation step for Secrets Manager rotation; it would leave the risk that a long-lived credential hardcoded into a container image stays stale after rotation.
E:Use a plaintext build log as the secret vault. This is not a suitable implementation or validation step for Secrets Manager rotation; it would leave the risk that a long-lived credential hardcoded into a container image stays stale after rotation.
Question 628
A Python Lambda needs distinct API base URLs in staging and production without code forks. Select THREE statements that together form a sound implementation and validation plan for this requirement.
- Treat environment variables as shared storage between parallel invocations.
- Invocations in each environment show the configured nonsecret value without changing application source.
- Commit a different handler source for every environment variable.
- Runtime configuration separates deployment settings from executable code when values differ by environment.
- Put sensitive credentials directly in plaintext logs.
- Set environment-specific Lambda configuration or AWS AppConfig values and read them at runtime.
Explanation
Correct Answers
B:Invocations in each environment show the configured nonsecret value without changing application source.
D:Runtime configuration separates deployment settings from executable code when values differ by environment. This states the AWS behavior that makes the implementation valid.
F:Set environment-specific Lambda configuration or AWS AppConfig values and read them at runtime. This is the concrete implementation required for Lambda environment configuration.
Incorrect Answers
A:Treat environment variables as shared storage between parallel invocations. This is not a suitable implementation or validation step for Lambda environment configuration; it would leave the risk that hardcoded stage URLs in application source can send production traffic to the wrong backend.
C:Commit a different handler source for every environment variable. This is not a suitable implementation or validation step for Lambda environment configuration; it would leave the risk that hardcoded stage URLs in application source can send production traffic to the wrong backend.
E:Put sensitive credentials directly in plaintext logs. This is not a suitable implementation or validation step for Lambda environment configuration; it would leave the risk that hardcoded stage URLs in application source can send production traffic to the wrong backend.
Question 629
A support portal must list cases by status across customers but the base primary key is case ID. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Add a Local Secondary Index to an existing table after creation.
- Expect a projection expression to convert a nonkey field into a key.
- Add a Global Secondary Index with the required alternate partition and sort keys.
- Queries against the index return the requested items without scanning unrelated base-table partitions.
- Use strongly consistent reads on every GSI query.
Explanation
Correct Answers
C:Add a Global Secondary Index with the required alternate partition and sort keys. This is the concrete implementation required for DynamoDB GSI access pattern.
D:Queries against the index return the requested items without scanning unrelated base-table partitions.
Incorrect Answers
A:Add a Local Secondary Index to an existing table after creation. This is not a suitable implementation or validation step for DynamoDB GSI access pattern; it would leave the risk that querying a nonkey base attribute without an index forces a scan or invalid key expression.
B:Expect a projection expression to convert a nonkey field into a key. This is not a suitable implementation or validation step for DynamoDB GSI access pattern; it would leave the risk that querying a nonkey base attribute without an index forces a scan or invalid key expression.
E:Use strongly consistent reads on every GSI query. This is not a suitable implementation or validation step for DynamoDB GSI access pattern; it would leave the risk that querying a nonkey base attribute without an index forces a scan or invalid key expression.
Question 630
A team uses AI assistance to propose AWS SDK code but must prevent unchecked suggestions from reaching production. Select TWO statements that together form a sound implementation and validation plan for this requirement.
- Treat AI output as authoritative without executing tests.
- Use Amazon Q Developer for suggestions and review generated code with tests, IAM checks, and human approval.
- Disable version control because suggestions are machine-generated.
- Test results and code review demonstrate generated changes meet requirements without new permissions exposure.
- Grant administrator access to every generated component.
Explanation
Correct Answers
B:Use Amazon Q Developer for suggestions and review generated code with tests, IAM checks, and human approval. This is the concrete implementation required for Amazon Q Developer review.
D:Test results and code review demonstrate generated changes meet requirements without new permissions exposure.
Incorrect Answers
A:Treat AI output as authoritative without executing tests. This is not a suitable implementation or validation step for Amazon Q Developer review; it would leave the risk that accepting generated code without review can introduce incorrect APIs or excessive permissions.
C:Disable version control because suggestions are machine-generated. This is not a suitable implementation or validation step for Amazon Q Developer review; it would leave the risk that accepting generated code without review can introduce incorrect APIs or excessive permissions.
E:Grant administrator access to every generated component. This is not a suitable implementation or validation step for Amazon Q Developer review; it would leave the risk that accepting generated code without review can introduce incorrect APIs or excessive permissions.