AWS Certified Developer - Associate DVA-C02 Practice Test 16
Question 150
A cloud developer must explain the mechanism behind a proposed solution. A new event worker produces duplicate refunds when test messages are redelivered after timeouts. Which technical explanation correctly accounts for the solution?
- A pipeline approval action prevents production promotion until a permitted reviewer approves the exact tested revision.
- A fixture exercises the exact envelope the event source sends, including metadata and nested record structures.
- Blue-green release keeps a known environment available while traffic moves to the tested replacement.
- Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely.
Explanation
Correct Answer
D:Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely. This is the operating principle for Event-driven integration test cases. Validation: Send a controlled duplicate event and a bad record and verify idempotent state and planned retry behavior. Scenario: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
Incorrect Answers
A:Option A explains CodePipeline cross-stage approval rather than this issue: A pipeline approval action prevents production promotion until a permitted reviewer approves the exact tested revision. It does not explain: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
B:Option B explains Test Lambda JSON event fixture rather than this issue: A fixture exercises the exact envelope the event source sends, including metadata and nested record structures. It does not explain: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
C:Option C explains CodeDeploy blue-green rollback rather than this issue: Blue-green release keeps a known environment available while traffic moves to the tested replacement. It does not explain: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
Question 151
An incident review asks which unsafe assumption in an AWS implementation must be prevented. An API has two customer applications and accidentally accepts a token intended for the other application's audience. Which overlooked failure condition is the central concern?
- Do not cache an expired token and continue sending it to a backend that requires valid claims.
- Do not treat any valid token from the identity provider as authorization for privileged write operations.
- Do not grant access merely because a token's JSON payload looks syntactically valid without verifying its signature and claims.
- Do not delete a KMS key immediately after rotation while historical encrypted data still requires its key.
Explanation
Correct Answer
B:Do not treat any valid token from the identity provider as authorization for privileged write operations. This is significant because JWT authorizers check token metadata and claims before invoking protected API routes. Scenario: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (Cognito bearer-token expiry and refresh): Do not cache an expired token and continue sending it to a backend that requires valid claims. It is not the key risk in: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
C:Option C warns about an unrelated failure boundary (Cognito user-pool login tokens): Do not grant access merely because a token's JSON payload looks syntactically valid without verifying its signature and claims. It is not the key risk in: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
D:Option D warns about an unrelated failure boundary (KMS rotation and encrypted data continuity): Do not delete a KMS key immediately after rotation while historical encrypted data still requires its key. It is not the key risk in: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
Question 152
An engineering reviewer is evaluating service behavior and authorization boundaries. Developers accidentally enable a beta checkout feature for all customers because staging and production share one config profile. Which mechanism explains the appropriate design decision?
- AppConfig separates runtime configuration and progressive rollout from application binary releases.
- A fixture exercises the exact envelope the event source sends, including metadata and nested record structures.
- Blue-green release keeps a known environment available while traffic moves to the tested replacement.
- Change sets preview the proposed resource operations, including destructive replacements and IAM changes.
Explanation
Correct Answer
A:AppConfig separates runtime configuration and progressive rollout from application binary releases. This is the operating principle for AppConfig environment feature flags. Validation: Enable a test flag only in staging and confirm production's flag stays unchanged during rollback. Scenario: Developers accidentally enable a beta checkout feature for all customers because staging and production share one config profile.
Incorrect Answers
B:Option B explains Test Lambda JSON event fixture rather than this issue: A fixture exercises the exact envelope the event source sends, including metadata and nested record structures. It does not explain: Developers accidentally enable a beta checkout feature for all customers because staging and production share one config profile.
C:Option C explains CodeDeploy blue-green rollback rather than this issue: Blue-green release keeps a known environment available while traffic moves to the tested replacement. It does not explain: Developers accidentally enable a beta checkout feature for all customers because staging and production share one config profile.
D:Option D explains SAM and CloudFormation change set review rather than this issue: Change sets preview the proposed resource operations, including destructive replacements and IAM changes. It does not explain: Developers accidentally enable a beta checkout feature for all customers because staging and production share one config profile.
Question 153
An AWS developer is reviewing the next application release. A QA environment shares production network settings not represented in the IaC template. Which technical change most directly meets the requirement?
- Use blue-green deployment of a previous verified application revision to support rollback when the new environment fails checks.
- Deploy a versioned CloudFormation or SAM template to create reproducible integration test resources.
- Build a versioned ECR container image with pinned base image and runtime dependencies for deployment.
- Route staging integration tests to a specific published Lambda version by using a named alias.
Explanation
Correct Answer
B:Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually. Apply: Deploy a versioned CloudFormation or SAM template to create reproducible integration test resources. Acceptance check: Launch a new test stack and compare its logical resources and configured permissions with the reviewed template. Scenario: A QA environment shares production network settings not represented in the IaC template.
Incorrect Answers
A:Option A implements a different developer control (CodeDeploy blue-green rollback): Use blue-green deployment of a previous verified application revision to support rollback when the new environment fails checks. That does not resolve the specific situation: A QA environment shares production network settings not represented in the IaC template.
C:Option C implements a different developer control (Container image dependency pinning): Build a versioned ECR container image with pinned base image and runtime dependencies for deployment. That does not resolve the specific situation: A QA environment shares production network settings not represented in the IaC template.
D:Option D implements a different developer control (Lambda aliases for versioned test routing): Route staging integration tests to a specific published Lambda version by using a named alias. That does not resolve the specific situation: A QA environment shares production network settings not represented in the IaC template.
Question 154
A development team must select an AWS application change. A production rollback cannot identify which source commit generated its previous working image. Which implementation best addresses this situation?
- Use version-controlled repository commits and immutable release tags to identify the exact source used for each deployment.
- Test API Gateway routes in a dedicated stage with stage-specific backend variables and request validation.
- Use Amazon Q Developer to suggest additional automated tests and review their assertions against real requirements before accepting them.
- Publish versioned CodeBuild build artifacts and promote the tested artifact through pipeline stages rather than rebuilding per stage.
Explanation
Correct Answer
A:Traceable source revisions allow a pipeline to rebuild, review, and roll back specific application releases. Apply: Use version-controlled repository commits and immutable release tags to identify the exact source used for each deployment. Acceptance check: Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier. Scenario: A production rollback cannot identify which source commit generated its previous working image.
Incorrect Answers
B:Option B implements a different developer control (API Gateway staging endpoint verification): Test API Gateway routes in a dedicated stage with stage-specific backend variables and request validation. That does not resolve the specific situation: A production rollback cannot identify which source commit generated its previous working image.
C:Option C implements a different developer control (Q Developer generated tests verification): Use Amazon Q Developer to suggest additional automated tests and review their assertions against real requirements before accepting them. That does not resolve the specific situation: A production rollback cannot identify which source commit generated its previous working image.
D:Option D implements a different developer control (CodeBuild artifact promotion): Publish versioned CodeBuild build artifacts and promote the tested artifact through pipeline stages rather than rebuilding per stage. That does not resolve the specific situation: A production rollback cannot identify which source commit generated its previous working image.
Question 155
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. Operators only discover that a public endpoint is unavailable after users start opening support tickets. What test most directly confirms the intended behavior?
- Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response.
- Trigger a safe known error then query its request ID and confirm the exception and affected service appear.
- Generate repeated traceable requests and confirm sampled segments include correlation but not secrets.
- Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Publish a controlled failure metric and confirm the alarm changes state and the intended SNS subscriber receives it. It demonstrates: Alarm evaluation periods and action destinations translate monitored metrics into timely incident notifications. Scenario: Operators only discover that a public endpoint is unavailable after users start opening support tickets.
Incorrect Answers
A:Option A is an acceptance test for API Gateway response caching: Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response. It is not direct evidence for: Operators only discover that a public endpoint is unavailable after users start opening support tickets.
B:Option B is an acceptance test for CloudWatch Logs Insights fault search: Trigger a safe known error then query its request ID and confirm the exception and affected service appear. It is not direct evidence for: Operators only discover that a public endpoint is unavailable after users start opening support tickets.
C:Option C is an acceptance test for App-level trace sampling and privacy: Generate repeated traceable requests and confirm sampled segments include correlation but not secrets. It is not direct evidence for: Operators only discover that a public endpoint is unavailable after users start opening support tickets.
Question 156
A development team must select an AWS application change. A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device. Which implementation best addresses this situation?
- Authenticate application users through a Cognito user pool and validate issued ID or access tokens against the correct intended audience and issuer.
- Classify response fields and return only authorized customer attributes, masking or excluding sensitive columns by role.
- Configure an API Gateway JWT authorizer that enforces the expected issuer, audience, and route-specific scopes.
- 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: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
Incorrect Answers
A:Option A implements a different developer control (Cognito user-pool login tokens): Authenticate application users through a Cognito user pool and validate issued ID or access tokens against the correct intended audience and issuer. That does not resolve the specific situation: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
B:Option B implements a different developer control (Sensitive data classification before API responses): Classify response fields and return only authorized customer attributes, masking or excluding sensitive columns by role. That does not resolve the specific situation: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
C:Option C 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: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
Question 157
A development team must select an AWS application change. A ledger processor needs sequential updates per account but can process different accounts independently. Which implementation best addresses this situation?
- Configure API Gateway request validators and explicit models to reject invalid payloads before invoking the integration.
- Use a Step Functions state machine with explicit task transitions, retries, and failure paths for a multi-step business process.
- Use an ElastiCache-backed read-through pattern with bounded TTL and deliberate invalidation for frequently read stable responses.
- Choose Kinesis partition keys to preserve per-entity event order while distributing unrelated entities across shards.
Explanation
Correct Answer
D:Kinesis Data Streams orders records within a shard; a partition key controls how related records are grouped. Apply: Choose Kinesis partition keys to preserve per-entity event order while distributing unrelated entities across shards. Acceptance check: Publish ordered updates for two account IDs and verify each account's local sequence is processed consistently. Scenario: A ledger processor needs sequential updates per account but can process different accounts independently.
Incorrect Answers
A:Option A implements a different developer control (API Gateway request validation): Configure API Gateway request validators and explicit models to reject invalid payloads before invoking the integration. That does not resolve the specific situation: A ledger processor needs sequential updates per account but can process different accounts independently.
B:Option B implements a different developer control (Step Functions orchestration): Use a Step Functions state machine with explicit task transitions, retries, and failure paths for a multi-step business process. That does not resolve the specific situation: A ledger processor needs sequential updates per account but can process different accounts independently.
C:Option C implements a different developer control (ElastiCache read-through cache): Use an ElastiCache-backed read-through pattern with bounded TTL and deliberate invalidation for frequently read stable responses. That does not resolve the specific situation: A ledger processor needs sequential updates per account but can process different accounts independently.
Question 158
A cloud developer must explain the mechanism behind a proposed solution. An online game stores all leaderboard updates under one partition key and sees throttles at high load. Which technical explanation correctly accounts for the solution?
- A hot partition can limit throughput independently of the table's aggregate provisioned or on-demand capacity.
- Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost.
- A redrive policy moves messages that repeatedly fail processing so they can be analyzed and replayed safely.
- Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually.
Explanation
Correct Answer
A:A hot partition can limit throughput independently of the table's aggregate provisioned or on-demand capacity. This is the operating principle for DynamoDB hot partition avoidance. Validation: Generate representative traffic and compare throttled requests before and after improving key diversity. Scenario: An online game stores all leaderboard updates under one partition key and sees throttles at high load.
Incorrect Answers
B:Option B explains Lambda performance memory cost tuning rather than this issue: Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost. It does not explain: An online game stores all leaderboard updates under one partition key and sees throttles at high load.
C:Option C explains SQS DLQ and receive-count troubleshooting rather than this issue: A redrive policy moves messages that repeatedly fail processing so they can be analyzed and replayed safely. It does not explain: An online game stores all leaderboard updates under one partition key and sees throttles at high load.
D:Option D explains CloudWatch Logs Insights fault search rather than this issue: Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually. It does not explain: An online game stores all leaderboard updates under one partition key and sees throttles at high load.
Question 159
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A developer hardcodes a staging API URL in code that is then deployed unchanged to production. Which observation is the strongest acceptance evidence?
- Execute the key-based query and measure returned items and consumed capacity versus a full scan.
- Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration.
- Load test a representative key distribution and inspect throttling by partition-key pattern.
- Replay the same payment event twice and verify a single business transaction is persisted.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration. It demonstrates: Environment variables can hold deployment configuration but hardcoded credentials or plaintext output logs create security risks. Scenario: A developer hardcodes a staging API URL in code that is then deployed unchanged to production.
Incorrect Answers
A:Option A is an acceptance test for DynamoDB query versus scan: Execute the key-based query and measure returned items and consumed capacity versus a full scan. It is not direct evidence for: A developer hardcodes a staging API URL in code that is then deployed unchanged to production.
C:Option C is an acceptance test for DynamoDB partition key hot spots: Load test a representative key distribution and inspect throttling by partition-key pattern. It is not direct evidence for: A developer hardcodes a staging API URL in code that is then deployed unchanged to production.
D:Option D is an acceptance test for SQS idempotent consumer design: Replay the same payment event twice and verify a single business transaction is persisted. It is not direct evidence for: A developer hardcodes a staging API URL in code that is then deployed unchanged to production.
Question 160
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A fulfillment service receives both provisional and paid-order events, but only paid orders should reserve stock. Which observation is the strongest acceptance evidence?
- Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed.
- Compare collected resource IDs against a fixture spanning several result pages including an empty final page.
- Publish approved and rejected sample order events and confirm only approved events invoke the consumer.
- Publish matching and nonmatching synthetic queue events and confirm only matching records invoke the function.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Publish approved and rejected sample order events and confirm only approved events invoke the consumer. It demonstrates: EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler. Scenario: A fulfillment service receives both provisional and paid-order events, but only paid orders should reserve stock.
Incorrect Answers
A:Option A is an acceptance test for S3 object events and duplicate handling: Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed. It is not direct evidence for: A fulfillment service receives both provisional and paid-order events, but only paid orders should reserve stock.
B:Option B is an acceptance test for AWS SDK paginator use: Compare collected resource IDs against a fixture spanning several result pages including an empty final page. It is not direct evidence for: A fulfillment service receives both provisional and paid-order events, but only paid orders should reserve stock.
D:Option D is an acceptance test for Lambda event filtering: Publish matching and nonmatching synthetic queue events and confirm only matching records invoke the function. It is not direct evidence for: A fulfillment service receives both provisional and paid-order events, but only paid orders should reserve stock.