AWS Certified Developer - Associate DVA-C02 Practice Test 52
Question 510
An AWS developer is reviewing the next application release. An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators. Which technical change most directly meets the requirement?
- Configure asynchronous Lambda invocation failure destinations and bounded retries to preserve failure evidence.
- Catch typed retryable AWS SDK service errors and handle terminal authorization or input failures separately.
- Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes.
- Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database.
Explanation
Correct Answer
B:The SDK can report throttling, transient failures, and permanent access denials that require different client behavior. Apply: Catch typed retryable AWS SDK service errors and handle terminal authorization or input failures separately. Acceptance check: Simulate throttling, invalid input, and access-denied responses and verify only transient cases enter controlled retry logic. Scenario: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
Incorrect Answers
A:Option A implements a different developer control (Lambda asynchronous failure destination): Configure asynchronous Lambda invocation failure destinations and bounded retries to preserve failure evidence. That does not resolve the specific situation: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
C:Option C implements a different developer control (SNS topic fanout): Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes. That does not resolve the specific situation: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
D:Option D implements a different developer control (Lambda VPC connectivity to private data): Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database. That does not resolve the specific situation: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
Question 511
A production readiness review identifies a potential software defect. A developer's SAM deployment overwrites the production environment because the same stack name is used. Which implementation risk must be rejected first?
- Do not call a live payment provider from unit tests intended to run safely in an isolated build environment.
- Do not rebuild an image under the same mutable tag after testing and assume the released bytes are identical.
- Do not reuse a production bucket or KMS key parameter during a disposable integration test stack deployment.
- Do not run destructive HTTP tests against the production custom domain because stages were not separated.
Explanation
Correct Answer
C:Do not reuse a production bucket or KMS key parameter during a disposable integration test stack deployment. This is significant because Infrastructure parameters let the same reviewed template create isolated environments with different endpoints and policies. Scenario: A developer's SAM deployment overwrites the production environment because the same stack name is used.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (SAM local unit tests and mocks): Do not call a live payment provider from unit tests intended to run safely in an isolated build environment. It is not the key risk in: A developer's SAM deployment overwrites the production environment because the same stack name is used.
B:Option B warns about an unrelated failure boundary (ECR image digest deployment): Do not rebuild an image under the same mutable tag after testing and assume the released bytes are identical. It is not the key risk in: A developer's SAM deployment overwrites the production environment because the same stack name is used.
D:Option D warns about an unrelated failure boundary (API Gateway staging endpoint verification): Do not run destructive HTTP tests against the production custom domain because stages were not separated. It is not the key risk in: A developer's SAM deployment overwrites the production environment because the same stack name is used.
Question 512
An incident review asks which unsafe assumption in an AWS implementation must be prevented. A QA environment shares production network settings not represented in the IaC template. Which overlooked failure condition is the central concern?
- Do not test an SQS-triggered Lambda with a bare business JSON object that omits the Records envelope.
- Do not let a build succeed when required test commands are skipped or their failure exit status is ignored.
- Do not manually patch resources after tests while claiming the deployed template fully describes the environment.
- Do not call a live payment provider from unit tests intended to run safely in an isolated build environment.
Explanation
Correct Answer
C:Do not manually patch resources after tests while claiming the deployed template fully describes the environment. This is significant because Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually. Scenario: A QA environment shares production network settings not represented in the IaC template.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (Test Lambda JSON event fixture): Do not test an SQS-triggered Lambda with a bare business JSON object that omits the Records envelope. It is not the key risk in: A QA environment shares production network settings not represented in the IaC template.
B:Option B warns about an unrelated failure boundary (CodeBuild integration test environment): Do not let a build succeed when required test commands are skipped or their failure exit status is ignored. It is not the key risk in: A QA environment shares production network settings not represented in the IaC template.
D:Option D warns about an unrelated failure boundary (SAM local unit tests and mocks): Do not call a live payment provider from unit tests intended to run safely in an isolated build environment. It is not the key risk in: A QA environment shares production network settings not represented in the IaC template.
Question 513
An AWS developer is reviewing the next application release. An application deployment shares a plaintext service encryption key through an environment YAML file in Git. Which technical change most directly meets the requirement?
- Use an IAM role with STS temporary credentials and a narrow policy for an application making AWS SDK calls.
- Store supported application secrets as encrypted Parameter Store SecureString parameters and control read/decrypt permissions.
- Validate and sanitize untrusted request fields with context-appropriate encoding and parameterized database queries.
- Avoid storing raw encryption keys in application code or environment files; retrieve or wrap keys through appropriate KMS-backed mechanisms.
Explanation
Correct Answer
D:Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely. Apply: Avoid storing raw encryption keys in application code or environment files; retrieve or wrap keys through appropriate KMS-backed mechanisms. Acceptance check: Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works. Scenario: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
Incorrect Answers
A:Option A implements a different developer control (IAM assumed role for workload): Use an IAM role with STS temporary credentials and a narrow policy for an application making AWS SDK calls. That does not resolve the specific situation: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
B:Option B implements a different developer control (AWS Systems Manager Parameter Store secure strings): Store supported application secrets as encrypted Parameter Store SecureString parameters and control read/decrypt permissions. That does not resolve the specific situation: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
C:Option C implements a different developer control (Input sanitization before data persistence): Validate and sanitize untrusted request fields with context-appropriate encoding and parameterized database queries. That does not resolve the specific situation: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
Question 514
A cloud developer must explain the mechanism behind a proposed solution. An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records. Which technical explanation correctly accounts for the solution?
- An artifact can build successfully while its runtime resource limits lead to OOM or throttled execution after release.
- AI-assisted test generation can reveal omitted cases but generated assertions and mocks must be inspected for false confidence.
- A version is immutable and an alias identifies which reviewed version receives traffic for the environment.
- A fixture exercises the exact envelope the event source sends, including metadata and nested record structures.
Explanation
Correct Answer
D:A fixture exercises the exact envelope the event source sends, including metadata and nested record structures. This is the operating principle for Test Lambda JSON event fixture. Validation: Replay known API and SQS test events and compare structured outputs and failure handling to expected values. Scenario: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
Incorrect Answers
A:Option A explains Application deployment memory sizing rather than this issue: An artifact can build successfully while its runtime resource limits lead to OOM or throttled execution after release. It does not explain: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
B:Option B explains Q Developer generated tests verification rather than this issue: AI-assisted test generation can reveal omitted cases but generated assertions and mocks must be inspected for false confidence. It does not explain: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
C:Option C explains Lambda aliases for versioned test routing rather than this issue: A version is immutable and an alias identifies which reviewed version receives traffic for the environment. It does not explain: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
Question 515
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A unit test for an order Lambda sends real notifications because it never mocks its SNS dependency. Which observation is the strongest acceptance evidence?
- Publish two versions and verify the staging alias routes to the expected one without modifying production.
- Deploy a minimal test package and invoke the configured handler while checking import resolution.
- Compare checksums of the artifact deployed to staging and production within the same approved release.
- Run a fixture representing missing and valid fields and assert deterministic output and error handling.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Run a fixture representing missing and valid fields and assert deterministic output and error handling. It demonstrates: Local event fixtures and mocks validate code behavior without needing access to production services. Scenario: A unit test for an order Lambda sends real notifications because it never mocks its SNS dependency.
Incorrect Answers
A:Option A is an acceptance test for Lambda aliases for versioned test routing: Publish two versions and verify the staging alias routes to the expected one without modifying production. It is not direct evidence for: A unit test for an order Lambda sends real notifications because it never mocks its SNS dependency.
B:Option B is an acceptance test for Lambda dependency archive packaging: Deploy a minimal test package and invoke the configured handler while checking import resolution. It is not direct evidence for: A unit test for an order Lambda sends real notifications because it never mocks its SNS dependency.
C:Option C is an acceptance test for CodeBuild artifact promotion: Compare checksums of the artifact deployed to staging and production within the same approved release. It is not direct evidence for: A unit test for an order Lambda sends real notifications because it never mocks its SNS dependency.
Question 516
A cloud developer must explain the mechanism behind a proposed solution. A session expires at noon but still appears in a DynamoDB query several minutes later. Which technical explanation correctly accounts for the solution?
- A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors.
- A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation.
- The SDK can report throttling, transient failures, and permanent access denials that require different client behavior.
- DynamoDB removes TTL-expired items eventually rather than at the exact second of the timestamp.
Explanation
Correct Answer
D:DynamoDB removes TTL-expired items eventually rather than at the exact second of the timestamp. This is the operating principle for DynamoDB TTL asynchronous deletion. Validation: Create a safe expired test item and check application filtering independently of background item deletion. Scenario: A session expires at noon but still appears in a DynamoDB query several minutes later.
Incorrect Answers
A:Option A explains API Gateway Lambda proxy response format rather than this issue: A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors. It does not explain: A session expires at noon but still appears in a DynamoDB query several minutes later.
B:Option B explains DynamoDB transaction writes rather than this issue: A DynamoDB transaction commits the supported grouped writes together or rejects the entire operation. It does not explain: A session expires at noon but still appears in a DynamoDB query several minutes later.
C:Option C explains AWS SDK service exception handling rather than this issue: The SDK can report throttling, transient failures, and permanent access denials that require different client behavior. It does not explain: A session expires at noon but still appears in a DynamoDB query several minutes later.
Question 517
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A five-message Lambda invocation processes four payments but retries all five after one malformed event. Which observation is the strongest acceptance evidence?
- Inject one poison message in a five-item batch and verify only failed IDs are retried after successful messages commit.
- Index a controlled set of documents and confirm phrase searches return the expected relevant records.
- Force a fulfillment task failure and confirm the state machine retries or reaches the designed compensation path.
- Cause one conditional action to fail and confirm that none of the transaction's item updates persist.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Inject one poison message in a five-item batch and verify only failed IDs are retried after successful messages commit. It demonstrates: Partial batch failure reporting limits retries to failed records if the event-source mapping is configured for that feature. Scenario: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
Incorrect Answers
B:Option B is an acceptance test for OpenSearch text search use case: Index a controlled set of documents and confirm phrase searches return the expected relevant records. It is not direct evidence for: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
C:Option C is an acceptance test for Step Functions orchestration: Force a fulfillment task failure and confirm the state machine retries or reaches the designed compensation path. It is not direct evidence for: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
D:Option D is an acceptance test for DynamoDB transaction writes: Cause one conditional action to fail and confirm that none of the transaction's item updates persist. It is not direct evidence for: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
Question 518
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A Lambda swallows DynamoDB conditional-write errors then falsely reports a payment was accepted. Which observation is the strongest acceptance evidence?
- Simulate throttling, invalid input, and access-denied responses and verify only transient cases enter controlled retry logic.
- Send malformed and valid API calls and confirm only conforming requests reach the target Lambda.
- Publish ordered updates for two account IDs and verify each account's local sequence is processed consistently.
- Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Simulate throttling, invalid input, and access-denied responses and verify only transient cases enter controlled retry logic. It demonstrates: The SDK can report throttling, transient failures, and permanent access denials that require different client behavior. Scenario: A Lambda swallows DynamoDB conditional-write errors then falsely reports a payment was accepted.
Incorrect Answers
B:Option B is an acceptance test for API Gateway request validation: Send malformed and valid API calls and confirm only conforming requests reach the target Lambda. It is not direct evidence for: A Lambda swallows DynamoDB conditional-write errors then falsely reports a payment was accepted.
C:Option C is an acceptance test for Kinesis per-shard ordering: Publish ordered updates for two account IDs and verify each account's local sequence is processed consistently. It is not direct evidence for: A Lambda swallows DynamoDB conditional-write errors then falsely reports a payment was accepted.
D:Option D is an acceptance test for Lambda environment configuration: Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration. It is not direct evidence for: A Lambda swallows DynamoDB conditional-write errors then falsely reports a payment was accepted.
Question 519
An AWS developer is reviewing the next application release. An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3. Which technical change most directly meets the requirement?
- Use AWS Signature Version 4 signing with scoped temporary credentials for authenticated AWS service requests.
- Require HTTPS with valid certificate chain and hostname validation for application calls to external and internal APIs.
- Select client-side encryption when payload confidentiality must be enforced before data reaches the AWS service endpoint.
- Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes.
Explanation
Correct Answer
C:Client-side encryption protects content before transfer, unlike server-side encryption performed after storage receives the object. Apply: Select client-side encryption when payload confidentiality must be enforced before data reaches the AWS service endpoint. Acceptance check: Upload a synthetic encrypted file and verify only a holder of the application key can reconstruct its plaintext. Scenario: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
Incorrect Answers
A:Option A implements a different developer control (SigV4 request signing): Use AWS Signature Version 4 signing with scoped temporary credentials for authenticated AWS service requests. That does not resolve the specific situation: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
B:Option B implements a different developer control (TLS server identity validation): Require HTTPS with valid certificate chain and hostname validation for application calls to external and internal APIs. That does not resolve the specific situation: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
D:Option D implements a different developer control (API Gateway JWT authorizer scope): Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes. That does not resolve the specific situation: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
Question 520
A development team must select an AWS application change. A public checkout API accepts requests without a required product ID and invokes Lambda before failing. Which implementation best addresses this situation?
- Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes.
- Configure asynchronous Lambda invocation failure destinations and bounded retries to preserve failure evidence.
- Return the required statusCode and correctly encoded body fields from a Lambda proxy integration.
- Configure API Gateway request validators and explicit models to reject invalid payloads before invoking the integration.
Explanation
Correct Answer
D:Validation at the API boundary can reject missing required fields and unsuitable request shapes before backend code runs. Apply: Configure API Gateway request validators and explicit models to reject invalid payloads before invoking the integration. Acceptance check: Send malformed and valid API calls and confirm only conforming requests reach the target Lambda. Scenario: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
Incorrect Answers
A:Option A implements a different developer control (SNS topic fanout): Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes. That does not resolve the specific situation: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
B:Option B implements a different developer control (Lambda asynchronous failure destination): Configure asynchronous Lambda invocation failure destinations and bounded retries to preserve failure evidence. That does not resolve the specific situation: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
C:Option C implements a different developer control (API Gateway Lambda proxy response format): Return the required statusCode and correctly encoded body fields from a Lambda proxy integration. That does not resolve the specific situation: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.