AWS Certified Developer - Associate DVA-C02 Practice Test 65
Question 640
A production readiness review identifies a potential software defect. A generated unit test passes even after authorization checks are removed because it mocks all policy decisions. Which implementation risk must be rejected first?
- Do not accept AI-generated tests that assert only HTTP 200 and ignore data correctness or authorization.
- Do not approve a stack update without checking that a stateful resource will not be replaced unexpectedly.
- Do not test an SQS-triggered Lambda with a bare business JSON object that omits the Records envelope.
- Do not claim mocked unit tests alone prove compatibility with a third-party API's actual response format.
Explanation
Correct Answer
A:Do not accept AI-generated tests that assert only HTTP 200 and ignore data correctness or authorization. This is significant because AI-assisted test generation can reveal omitted cases but generated assertions and mocks must be inspected for false confidence. Scenario: A generated unit test passes even after authorization checks are removed because it mocks all policy decisions.
Incorrect Answers
B:Option B warns about an unrelated failure boundary (SAM and CloudFormation change set review): Do not approve a stack update without checking that a stateful resource will not be replaced unexpectedly. It is not the key risk in: A generated unit test passes even after authorization checks are removed because it mocks all policy decisions.
C:Option C 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 generated unit test passes even after authorization checks are removed because it mocks all policy decisions.
D:Option D warns about an unrelated failure boundary (Integration test API dependency contract): Do not claim mocked unit tests alone prove compatibility with a third-party API's actual response format. It is not the key risk in: A generated unit test passes even after authorization checks are removed because it mocks all policy decisions.
Question 641
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A search feature flag causes higher API latency and operators need to disable it without repackaging Lambdas. Which observation is the strongest acceptance evidence?
- Deploy a minimal test package and invoke the configured handler while checking import resolution.
- Generate a test change set and verify an intended safe update does not replace the production database.
- Publish a staging configuration with a forced alarm and verify rollback restores the former configuration version.
- Build a test image, inspect its digest, and deploy that exact digest to staging before production promotion.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Publish a staging configuration with a forced alarm and verify rollback restores the former configuration version. It demonstrates: AppConfig can change runtime configuration separately from packaged code and use monitored rollout/rollback controls. Scenario: A search feature flag causes higher API latency and operators need to disable it without repackaging Lambdas.
Incorrect Answers
A:Option A 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 search feature flag causes higher API latency and operators need to disable it without repackaging Lambdas.
B:Option B is an acceptance test for SAM and CloudFormation change set review: Generate a test change set and verify an intended safe update does not replace the production database. It is not direct evidence for: A search feature flag causes higher API latency and operators need to disable it without repackaging Lambdas.
D:Option D is an acceptance test for Container image dependency pinning: Build a test image, inspect its digest, and deploy that exact digest to staging before production promotion. It is not direct evidence for: A search feature flag causes higher API latency and operators need to disable it without repackaging Lambdas.
Question 642
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A single-page app stores bearer tokens forever even after an administrator revokes the user's session. What test most directly confirms the intended behavior?
- Run permitted and denied test operations against sibling resources to verify scope boundaries.
- Attach an excessive policy to a bounded test role and show a forbidden action is still denied.
- Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works.
- Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates. It demonstrates: Access tokens have bounded validity, and refresh flows must respect revocation and client configuration. Scenario: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
Incorrect Answers
A:Option A is an acceptance test for IAM least-privilege resource ARN: Run permitted and denied test operations against sibling resources to verify scope boundaries. It is not direct evidence for: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
B:Option B is an acceptance test for IAM permission boundary intersection: Attach an excessive policy to a bounded test role and show a forbidden action is still denied. It is not direct evidence for: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
C:Option C is an acceptance test for Encryption key in application config: Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works. It is not direct evidence for: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
Question 643
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A stream Lambda wakes for every telemetry record though only critical alarms need transformation. Which observation is the strongest acceptance evidence?
- Trigger a synthetic handler exception and verify retry count and the corresponding on-failure event record.
- Make a test handler run longer than the previous timeout and verify its message is not processed concurrently.
- Publish matching and nonmatching synthetic queue events and confirm only matching records invoke the function.
- Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Publish matching and nonmatching synthetic queue events and confirm only matching records invoke the function. It demonstrates: Event filtering avoids running function code for records that cannot satisfy the configured content condition. Scenario: A stream Lambda wakes for every telemetry record though only critical alarms need transformation.
Incorrect Answers
A:Option A is an acceptance test for Lambda asynchronous failure destination: Trigger a synthetic handler exception and verify retry count and the corresponding on-failure event record. It is not direct evidence for: A stream Lambda wakes for every telemetry record though only critical alarms need transformation.
B:Option B is an acceptance test for SQS visibility timeout and retries: Make a test handler run longer than the previous timeout and verify its message is not processed concurrently. It is not direct evidence for: A stream Lambda wakes for every telemetry record though only critical alarms need transformation.
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: A stream Lambda wakes for every telemetry record though only critical alarms need transformation.
Question 644
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A route update works under a direct Lambda invocation but fails via API Gateway because of its stage mapping. What test most directly confirms the intended behavior?
- Compare checksums of the artifact deployed to staging and production within the same approved release.
- Enable a test flag only in staging and confirm production's flag stays unchanged during rollback.
- Deploy a test stack and verify its queue, role, and API identifiers differ from production.
- Invoke the staging URL and verify only the staging Lambda alias and test dataset receive the request.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Invoke the staging URL and verify only the staging Lambda alias and test dataset receive the request. It demonstrates: Separate API stages let developers exercise route changes without directing tests at production functions and data. Scenario: A route update works under a direct Lambda invocation but fails via API Gateway because of its stage mapping.
Incorrect Answers
A:Option A 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 route update works under a direct Lambda invocation but fails via API Gateway because of its stage mapping.
B:Option B 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 route update works under a direct Lambda invocation but fails via API Gateway because of its stage mapping.
C:Option C is an acceptance test for SAM parameter overrides for staging: Deploy a test stack and verify its queue, role, and API identifiers differ from production. It is not direct evidence for: A route update works under a direct Lambda invocation but fails via API Gateway because of its stage mapping.
Question 645
An engineering reviewer is evaluating service behavior and authorization boundaries. A function caches a rotated database password forever and all new connections fail the next day. Which mechanism explains the appropriate design decision?
- Secret versions can rotate independently of a code deployment, while clients must handle cached credential updates.
- Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts.
- An IAM permissions boundary limits the permissions the identity policy can grant; it does not grant permissions by itself.
- TLS protects data in transit and server-authentication checks prevent connecting to an impostor endpoint.
Explanation
Correct Answer
A:Secret versions can rotate independently of a code deployment, while clients must handle cached credential updates. This is the operating principle for Secrets Manager credential rotation. Validation: Rotate a nonproduction test credential and confirm new connections work after refresh without embedding the secret in source code. Scenario: A function caches a rotated database password forever and all new connections fail the next day.
Incorrect Answers
B:Option B explains Secrets in Lambda environment variables rather than this issue: Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts. It does not explain: A function caches a rotated database password forever and all new connections fail the next day.
C:Option C explains IAM permission boundary intersection rather than this issue: An IAM permissions boundary limits the permissions the identity policy can grant; it does not grant permissions by itself. It does not explain: A function caches a rotated database password forever and all new connections fail the next day.
D:Option D explains TLS server identity validation rather than this issue: TLS protects data in transit and server-authentication checks prevent connecting to an impostor endpoint. It does not explain: A function caches a rotated database password forever and all new connections fail the next day.
Question 646
An engineering reviewer is evaluating service behavior and authorization boundaries. A mobile application cannot parse an endpoint because the Lambda proxy returns a nested object as the response body. Which mechanism explains the appropriate design decision?
- EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler.
- A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors.
- Reserved concurrency sets a function-level execution ceiling, protecting a constrained target from fanout spikes.
- S3 event notifications can be duplicated and ordering is not guaranteed; handlers must defend against repeated effects.
Explanation
Correct Answer
B:A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors. This is the operating principle for API Gateway Lambda proxy response format. Validation: Invoke a test API route and assert HTTP status, response headers, and parsed JSON body match the contract. Scenario: A mobile application cannot parse an endpoint because the Lambda proxy returns a nested object as the response body.
Incorrect Answers
A:Option A explains EventBridge content-based routing rather than this issue: EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler. It does not explain: A mobile application cannot parse an endpoint because the Lambda proxy returns a nested object as the response body.
C:Option C explains Lambda reserved concurrency rather than this issue: Reserved concurrency sets a function-level execution ceiling, protecting a constrained target from fanout spikes. It does not explain: A mobile application cannot parse an endpoint because the Lambda proxy returns a nested object as the response body.
D:Option D explains S3 object events and duplicate handling rather than this issue: S3 event notifications can be duplicated and ordering is not guaranteed; handlers must defend against repeated effects. It does not explain: A mobile application cannot parse an endpoint because the Lambda proxy returns a nested object as the response body.
Question 647
An incident review asks which unsafe assumption in an AWS implementation must be prevented. An application deployment shares a plaintext service encryption key through an environment YAML file in Git. Which overlooked failure condition is the central concern?
- Do not serialize entire ORM user objects into API responses when they include credential hashes and private fields.
- Do not commit symmetric encryption keys into a container image that is replicated across development accounts.
- Do not grant access merely because a token's JSON payload looks syntactically valid without verifying its signature and claims.
- Do not send multi-megabyte raw payloads to KMS Encrypt expecting it to replace streaming symmetric encryption.
Explanation
Correct Answer
B:Do not commit symmetric encryption keys into a container image that is replicated across development accounts. This is significant because Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely. Scenario: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (Sensitive data classification before API responses): Do not serialize entire ORM user objects into API responses when they include credential hashes and private fields. It is not the key risk in: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
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 application deployment shares a plaintext service encryption key through an environment YAML file in Git.
D:Option D warns about an unrelated failure boundary (KMS envelope encryption pattern): Do not send multi-megabyte raw payloads to KMS Encrypt expecting it to replace streaming symmetric encryption. It is not the key risk in: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
Question 648
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3. What test most directly confirms the intended behavior?
- Upload a synthetic encrypted file and verify only a holder of the application key can reconstruct its plaintext.
- Sign in as an authenticated test user and verify their temporary AWS credentials can reach only the expected S3 resources.
- Invoke the same API with two customer identities and verify neither can retrieve the other's object identifiers.
- Connect to a trusted endpoint and deliberately invalid certificate and verify the invalid peer is rejected.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Upload a synthetic encrypted file and verify only a holder of the application key can reconstruct its plaintext. It demonstrates: Client-side encryption protects content before transfer, unlike server-side encryption performed after storage receives the object. Scenario: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
Incorrect Answers
B:Option B is an acceptance test for Cognito identity pool scoped AWS access: Sign in as an authenticated test user and verify their temporary AWS credentials can reach only the expected S3 resources. It is not direct evidence for: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
C:Option C is an acceptance test for Fine-grained application tenant authorization: Invoke the same API with two customer identities and verify neither can retrieve the other's object identifiers. It is not direct evidence for: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
D:Option D is an acceptance test for TLS server identity validation: Connect to a trusted endpoint and deliberately invalid certificate and verify the invalid peer is rejected. It is not direct evidence for: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
Question 649
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A product listing performs identical costly lookups thousands of times per minute despite rare updates. Which observation is the strongest acceptance evidence?
- Create a safe expired test item and check application filtering independently of background item deletion.
- Update a catalog price and verify clients see the new value after the correct invalidation or TTL rule.
- Race two updates with the same old version and verify only one succeeds while the other receives a conditional error.
- Execute the key-based query and measure returned items and consumed capacity versus a full scan.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Update a catalog price and verify clients see the new value after the correct invalidation or TTL rule. It demonstrates: Caching reduces repeated backend reads but creates a freshness boundary determined by expiration and explicit invalidation. Scenario: A product listing performs identical costly lookups thousands of times per minute despite rare updates.
Incorrect Answers
A:Option A is an acceptance test for DynamoDB TTL asynchronous deletion: Create a safe expired test item and check application filtering independently of background item deletion. It is not direct evidence for: A product listing performs identical costly lookups thousands of times per minute despite rare updates.
C:Option C is an acceptance test for DynamoDB conditional writes: Race two updates with the same old version and verify only one succeeds while the other receives a conditional error. It is not direct evidence for: A product listing performs identical costly lookups thousands of times per minute despite rare updates.
D:Option D 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 product listing performs identical costly lookups thousands of times per minute despite rare updates.
Question 650
A development team must select an AWS application change. A business dashboard reads any customer invoice when the client supplies a different tenantId. Which implementation best addresses this situation?
- Require authenticated tenant IDs in database query keys or conditions rather than accepting a caller-controlled tenant key alone.
- 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.
- Redact or tokenize sensitive customer fields in application logs before emitting structured events to monitoring systems.
Explanation
Correct Answer
A:Identity claims determine tenant authorization independently of which resource key a user guesses or sends in a URL. Apply: Require authenticated tenant IDs in database query keys or conditions rather than accepting a caller-controlled tenant key alone. Acceptance check: Request another tenant's document using a forged URL parameter and confirm it is rejected before data retrieval. Scenario: A business dashboard reads any customer invoice when the client supplies a different tenantId.
Incorrect Answers
B:Option B 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: A business dashboard reads any customer invoice when the client supplies a different tenantId.
C:Option C 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: A business dashboard reads any customer invoice when the client supplies a different tenantId.
D:Option D implements a different developer control (PII masking in application logs): Redact or tokenize sensitive customer fields in application logs before emitting structured events to monitoring systems. That does not resolve the specific situation: A business dashboard reads any customer invoice when the client supplies a different tenantId.