AWS Certified Developer - Associate DVA-C02 Practice Test 10
Question 90
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A function writes its database password into a debug log after reading an environment variable. What test most directly confirms the intended behavior?
- Send malformed and valid API calls and confirm only conforming requests reach the target Lambda.
- Generate a harmless unit-test helper and run lint, tests, and a human diff review prior to deployment.
- Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration.
- Simulate throttling, invalid input, and access-denied responses and verify only transient cases enter controlled retry logic.
Explanation
Correct Answer
C: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 function writes its database password into a debug log after reading an environment variable.
Incorrect Answers
A:Option A 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 function writes its database password into a debug log after reading an environment variable.
B:Option B is an acceptance test for Amazon Q Developer generated code review: Generate a harmless unit-test helper and run lint, tests, and a human diff review prior to deployment. It is not direct evidence for: A function writes its database password into a debug log after reading an environment variable.
D:Option D is an acceptance test for AWS SDK service exception handling: Simulate throttling, invalid input, and access-denied responses and verify only transient cases enter controlled retry logic. It is not direct evidence for: A function writes its database password into a debug log after reading an environment variable.
Question 91
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. An account-creation API allows empty email bodies despite a documented JSON schema contract. What test most directly confirms the intended behavior?
- Execute the key-based query and measure returned items and consumed capacity versus a full scan.
- Send malformed and valid API calls and confirm only conforming requests reach the target Lambda.
- Generate a harmless unit-test helper and run lint, tests, and a human diff review prior to deployment.
- Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Send malformed and valid API calls and confirm only conforming requests reach the target Lambda. It demonstrates: Validation at the API boundary can reject missing required fields and unsuitable request shapes before backend code runs. Scenario: An account-creation API allows empty email bodies despite a documented JSON schema contract.
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: An account-creation API allows empty email bodies despite a documented JSON schema contract.
C:Option C is an acceptance test for Amazon Q Developer generated code review: Generate a harmless unit-test helper and run lint, tests, and a human diff review prior to deployment. It is not direct evidence for: An account-creation API allows empty email bodies despite a documented JSON schema contract.
D:Option D is an acceptance test for DynamoDB strong read consistency: Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit. It is not direct evidence for: An account-creation API allows empty email bodies despite a documented JSON schema contract.
Question 92
A cloud developer must explain the mechanism behind a proposed solution. A multilingual site serves the wrong translation because CloudFront caches both locales under the same key. Which technical explanation correctly accounts for the solution?
- Client-side 4xx failures and 5xx integration or backend faults require different debugging paths.
- Machine-readable fields support consistent filtering and cross-service incident timelines without exposing secrets.
- A cache key built from relevant path, query, cookies, and headers separates content variants without fragmenting the cache unnecessarily.
- Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost.
Explanation
Correct Answer
C:A cache key built from relevant path, query, cookies, and headers separates content variants without fragmenting the cache unnecessarily. This is the operating principle for CloudFront caching by request headers. Validation: Request two localized response variants and verify correct cache behavior and cache-hit improvements. Scenario: A multilingual site serves the wrong translation because CloudFront caches both locales under the same key.
Incorrect Answers
A:Option A explains API Gateway 4xx versus 5xx root cause rather than this issue: Client-side 4xx failures and 5xx integration or backend faults require different debugging paths. It does not explain: A multilingual site serves the wrong translation because CloudFront caches both locales under the same key.
B:Option B explains Structured JSON application logging rather than this issue: Machine-readable fields support consistent filtering and cross-service incident timelines without exposing secrets. It does not explain: A multilingual site serves the wrong translation because CloudFront caches both locales under the same key.
D:Option D 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: A multilingual site serves the wrong translation because CloudFront caches both locales under the same key.
Question 93
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A payment API writes a status to DynamoDB and immediately needs the authoritative state on the same Region table. Which observation is the strongest acceptance evidence?
- Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit.
- Cause one conditional action to fail and confirm that none of the transaction's item updates persist.
- Generate a harmless unit-test helper and run lint, tests, and a human diff review prior to deployment.
- Publish matching and nonmatching synthetic queue events and confirm only matching records invoke the function.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit. It demonstrates: Eventually consistent reads can temporarily return stale data, while supported strong reads trade capacity for freshness. Scenario: A payment API writes a status to DynamoDB and immediately needs the authoritative state on the same Region table.
Incorrect Answers
B:Option B 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 payment API writes a status to DynamoDB and immediately needs the authoritative state on the same Region table.
C:Option C is an acceptance test for Amazon Q Developer generated code review: Generate a harmless unit-test helper and run lint, tests, and a human diff review prior to deployment. It is not direct evidence for: A payment API writes a status to DynamoDB and immediately needs the authoritative state on the same Region table.
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 payment API writes a status to DynamoDB and immediately needs the authoritative state on the same Region table.
Question 94
An engineering reviewer is evaluating service behavior and authorization boundaries. A new Python runtime passes locally but build jobs still use an older image that does not support the dependency. Which mechanism explains the appropriate design decision?
- A fixture exercises the exact envelope the event source sends, including metadata and nested record structures.
- Tags can move, whereas a digest identifies specific image content that can be validated across environments.
- Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions.
- Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts.
Explanation
Correct Answer
D:Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts. This is the operating principle for CodeBuild integration test environment. Validation: Deliberately break a test and confirm the build fails before any deployment stage starts. Scenario: A new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
Incorrect Answers
A:Option A 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 Python runtime passes locally but build jobs still use an older image that does not support the dependency.
B:Option B explains ECR image digest deployment rather than this issue: Tags can move, whereas a digest identifies specific image content that can be validated across environments. It does not explain: A new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
C:Option C explains Container image dependency pinning rather than this issue: Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions. It does not explain: A new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
Question 95
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery. Which observation is the strongest acceptance evidence?
- Cause one conditional action to fail and confirm that none of the transaction's item updates persist.
- Publish approved and rejected sample order events and confirm only approved events invoke the consumer.
- Replay the same payment event twice and verify a single business transaction is persisted.
- Load test a representative key distribution and inspect throttling by partition-key pattern.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Replay the same payment event twice and verify a single business transaction is persisted. It demonstrates: Standard SQS and retried workers can deliver duplicates; a durable deduplication condition prevents repeated side effects. Scenario: A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
Incorrect Answers
A:Option A 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 standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
B:Option B is an acceptance test for EventBridge content-based routing: Publish approved and rejected sample order events and confirm only approved events invoke the consumer. It is not direct evidence for: A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
D:Option D 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 standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
Question 96
A development team must select an AWS application change. A payment service records traces but engineers cannot filter the failing requests by safe order channel. Which implementation best addresses this situation?
- Attach appropriately bounded X-Ray annotations to selected segments so investigators can filter traces by safe business dimensions.
- Compare API Gateway execution and access logs, integration status, and backend logs to isolate client validation from service faults.
- Inspect DynamoDB partition-key distribution and throttling before increasing total read or write capacity.
- Configure a CloudFront cache policy that includes only request headers required to vary a response.
Explanation
Correct Answer
A:Indexed annotations support filtering traces by defined key-value pairs while metadata can hold less indexed detail. Apply: Attach appropriately bounded X-Ray annotations to selected segments so investigators can filter traces by safe business dimensions. Acceptance check: Emit traces with safe test tenant identifiers and synthetic sensitive data; verify useful filtering works while confidential identifiers are excluded from annotations. Scenario: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
Incorrect Answers
B:Option B implements a different developer control (API Gateway 4xx versus 5xx root cause): Compare API Gateway execution and access logs, integration status, and backend logs to isolate client validation from service faults. That does not resolve the specific situation: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
C:Option C implements a different developer control (DynamoDB hot partition avoidance): Inspect DynamoDB partition-key distribution and throttling before increasing total read or write capacity. That does not resolve the specific situation: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
D:Option D implements a different developer control (CloudFront caching by request headers): Configure a CloudFront cache policy that includes only request headers required to vary a response. That does not resolve the specific situation: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
Question 97
An engineering reviewer is evaluating service behavior and authorization boundaries. A deployment changes the API stage variable and sends staging traffic into a live payment handler. Which mechanism explains the appropriate design decision?
- Local event fixtures and mocks validate code behavior without needing access to production services.
- Stages isolate API deployments and allow controlled references to backends without changing client-visible production routes.
- Integration tests check how components interact through the expected API contract, including timeouts and malformed responses.
- A fixture exercises the exact envelope the event source sends, including metadata and nested record structures.
Explanation
Correct Answer
B:Stages isolate API deployments and allow controlled references to backends without changing client-visible production routes. This is the operating principle for API Gateway stage variables and versions. Validation: Invoke staging and production URLs and confirm each reaches the configured function version or alias. Scenario: A deployment changes the API stage variable and sends staging traffic into a live payment handler.
Incorrect Answers
A:Option A explains SAM local unit tests and mocks rather than this issue: Local event fixtures and mocks validate code behavior without needing access to production services. It does not explain: A deployment changes the API stage variable and sends staging traffic into a live payment handler.
C:Option C explains Integration test API dependency contract rather than this issue: Integration tests check how components interact through the expected API contract, including timeouts and malformed responses. It does not explain: A deployment changes the API stage variable and sends staging traffic into a live payment handler.
D:Option D 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 deployment changes the API stage variable and sends staging traffic into a live payment handler.
Question 98
A development team must select an AWS application change. A user-profile API scans a million items to retrieve one account by accountId. Which implementation best addresses this situation?
- Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database.
- Use a DynamoDB Query with known partition-key conditions or an appropriate index instead of repeatedly scanning every item.
- Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes.
- Use the service SDK paginator or continuation token until all result pages have been retrieved.
Explanation
Correct Answer
B:Query narrows access by indexed key whereas Scan reads broadly and incurs unnecessary capacity and latency. Apply: Use a DynamoDB Query with known partition-key conditions or an appropriate index instead of repeatedly scanning every item. Acceptance check: Execute the key-based query and measure returned items and consumed capacity versus a full scan. Scenario: A user-profile API scans a million items to retrieve one account by accountId.
Incorrect Answers
A:Option A 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: A user-profile API scans a million items to retrieve one account by accountId.
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: A user-profile API scans a million items to retrieve one account by accountId.
D:Option D implements a different developer control (AWS SDK paginator use): Use the service SDK paginator or continuation token until all result pages have been retrieved. That does not resolve the specific situation: A user-profile API scans a million items to retrieve one account by accountId.
Question 99
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A new Python runtime passes locally but build jobs still use an older image that does not support the dependency. What test most directly confirms the intended behavior?
- Enable a test flag only in staging and confirm production's flag stays unchanged during rollback.
- Deliberately break a test and confirm the build fails before any deployment stage starts.
- Run a safe integration build and confirm production deployment waits for the explicit approval decision.
- Deploy a minimal test package and invoke the configured handler while checking import resolution.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Deliberately break a test and confirm the build fails before any deployment stage starts. It demonstrates: Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts. Scenario: A new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
Incorrect Answers
A:Option A is an acceptance test for AppConfig environment feature flags: Enable a test flag only in staging and confirm production's flag stays unchanged during rollback. It is not direct evidence for: A new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
C:Option C is an acceptance test for CodePipeline cross-stage approval: Run a safe integration build and confirm production deployment waits for the explicit approval decision. It is not direct evidence for: A new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
D:Option D 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 new Python runtime passes locally but build jobs still use an older image that does not support the dependency.
Question 100
A cloud developer must explain the mechanism behind a proposed solution. A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery. Which technical explanation correctly accounts for the solution?
- VPC-connected Lambda network interfaces need reachable routes and security-group permissions for database connections.
- Standard SQS and retried workers can deliver duplicates; a durable deduplication condition prevents repeated side effects.
- A GSI exposes an alternate partition and optional sort key, with asynchronous index propagation and separate capacity impacts.
- SNS fanout distributes an event to multiple subscribed endpoints without making independent workers compete for one queue message.
Explanation
Correct Answer
B:Standard SQS and retried workers can deliver duplicates; a durable deduplication condition prevents repeated side effects. This is the operating principle for SQS idempotent consumer design. Validation: Replay the same payment event twice and verify a single business transaction is persisted. Scenario: A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
Incorrect Answers
A:Option A explains Lambda VPC connectivity to private data rather than this issue: VPC-connected Lambda network interfaces need reachable routes and security-group permissions for database connections. It does not explain: A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
C:Option C explains DynamoDB global secondary index design rather than this issue: A GSI exposes an alternate partition and optional sort key, with asynchronous index propagation and separate capacity impacts. It does not explain: A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.
D:Option D explains SNS topic fanout rather than this issue: SNS fanout distributes an event to multiple subscribed endpoints without making independent workers compete for one queue message. It does not explain: A standard SQS consumer repeats a charge after a transient response timeout triggers redelivery.