AWS Certified Developer - Associate DVA-C02 Practice Test 14
Question 130
An engineering reviewer is evaluating service behavior and authorization boundaries. An application stores a plaintext AES key next to encrypted customer objects instead of using a protected data key. Which mechanism explains the appropriate design decision?
- The response serializer can enforce an allowlist for sensitive fields after identity and authorization checks.
- TLS protects data in transit and server-authentication checks prevent connecting to an impostor endpoint.
- Secret versions can rotate independently of a code deployment, while clients must handle cached credential updates.
- KMS GenerateDataKey returns key material and an encrypted key blob; the client uses the plaintext key only transiently for data encryption.
Explanation
Correct Answer
D:KMS GenerateDataKey returns key material and an encrypted key blob; the client uses the plaintext key only transiently for data encryption. This is the operating principle for KMS envelope encryption pattern. Validation: Encrypt and decrypt a synthetic large payload while verifying encrypted data keys, authorization, and key handling. Scenario: An application stores a plaintext AES key next to encrypted customer objects instead of using a protected data key.
Incorrect Answers
A:Option A explains Sensitive data classification before API responses rather than this issue: The response serializer can enforce an allowlist for sensitive fields after identity and authorization checks. It does not explain: An application stores a plaintext AES key next to encrypted customer objects instead of using a protected data key.
B:Option B 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: An application stores a plaintext AES key next to encrypted customer objects instead of using a protected data key.
C:Option C explains Secrets Manager credential rotation rather than this issue: Secret versions can rotate independently of a code deployment, while clients must handle cached credential updates. It does not explain: An application stores a plaintext AES key next to encrypted customer objects instead of using a protected data key.
Question 131
An AWS developer is reviewing the next application release. A fraud scoring queue is flooded by catalog update events because the SNS subscription has no filtering. Which technical change most directly meets the requirement?
- Emit structured JSON logs with timestamp, severity, operation, and correlation ID while redacting sensitive data.
- Add an SNS subscription filter policy that forwards only matching event attributes or message bodies to a target queue.
- Profile Lambda memory, duration, init time, and total per-invocation cost before choosing a power setting.
- Provide separate application readiness and liveness behavior so traffic is routed only when dependencies are ready.
Explanation
Correct Answer
B:Subscription filtering reduces irrelevant deliveries and downstream processing while preserving intended event fanout. Apply: Add an SNS subscription filter policy that forwards only matching event attributes or message bodies to a target queue. Acceptance check: Publish events with different types and verify each queue receives only its matching type. Scenario: A fraud scoring queue is flooded by catalog update events because the SNS subscription has no filtering.
Incorrect Answers
A:Option A implements a different developer control (Structured JSON application logging): Emit structured JSON logs with timestamp, severity, operation, and correlation ID while redacting sensitive data. That does not resolve the specific situation: A fraud scoring queue is flooded by catalog update events because the SNS subscription has no filtering.
C:Option C implements a different developer control (Lambda performance memory cost tuning): Profile Lambda memory, duration, init time, and total per-invocation cost before choosing a power setting. That does not resolve the specific situation: A fraud scoring queue is flooded by catalog update events because the SNS subscription has no filtering.
D:Option D implements a different developer control (Readiness versus liveness health checks): Provide separate application readiness and liveness behavior so traffic is routed only when dependencies are ready. That does not resolve the specific situation: A fraud scoring queue is flooded by catalog update events because the SNS subscription has no filtering.
Question 132
An incident review asks which unsafe assumption in an AWS implementation must be prevented. A patched image was tested but its release manifest points to an earlier digest with vulnerable dependencies. Which overlooked failure condition is the central concern?
- Do not rebuild an image under the same mutable tag after testing and assume the released bytes are identical.
- Do not enable a high-impact feature for all tenants instantly without validating monitoring and rollback.
- Do not accept AI-generated tests that assert only HTTP 200 and ignore data correctness or authorization.
- Do not represent a passing build stage as a substitute for the organization's required release approval.
Explanation
Correct Answer
A:Do not rebuild an image under the same mutable tag after testing and assume the released bytes are identical. This is significant because Tags can move, whereas a digest identifies specific image content that can be validated across environments. Scenario: A patched image was tested but its release manifest points to an earlier digest with vulnerable dependencies.
Incorrect Answers
B:Option B warns about an unrelated failure boundary (AppConfig progressive rollout rollback): Do not enable a high-impact feature for all tenants instantly without validating monitoring and rollback. It is not the key risk in: A patched image was tested but its release manifest points to an earlier digest with vulnerable dependencies.
C:Option C warns about an unrelated failure boundary (Q Developer generated tests verification): Do not accept AI-generated tests that assert only HTTP 200 and ignore data correctness or authorization. It is not the key risk in: A patched image was tested but its release manifest points to an earlier digest with vulnerable dependencies.
D:Option D warns about an unrelated failure boundary (CodePipeline cross-stage approval): Do not represent a passing build stage as a substitute for the organization's required release approval. It is not the key risk in: A patched image was tested but its release manifest points to an earlier digest with vulnerable dependencies.
Question 133
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution. Which observation is the strongest acceptance evidence?
- Publish one synthetic purchase event and confirm both the email and analytics queues receive their own copies.
- Compare duration, memory usage, and invocation cost for two sizes using the same representative workload.
- Trigger a synthetic handler exception and verify retry count and the corresponding on-failure event record.
- Replay the same payment event twice and verify a single business transaction is persisted.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Compare duration, memory usage, and invocation cost for two sizes using the same representative workload. It demonstrates: Lambda memory allocation also changes available CPU resources, so larger memory may lower duration at acceptable cost. Scenario: A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
Incorrect Answers
A:Option A is an acceptance test for SNS topic fanout: Publish one synthetic purchase event and confirm both the email and analytics queues receive their own copies. It is not direct evidence for: A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
C:Option C 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 JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
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 JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
Question 134
An engineering reviewer is evaluating service behavior and authorization boundaries. A liveness probe restarts healthy but not-yet-ready containers repeatedly during a slow database migration. Which mechanism explains the appropriate design decision?
- A hot partition can limit throughput independently of the table's aggregate provisioned or on-demand capacity.
- A distributed trace relates individual service segments and timing to one end-to-end user request.
- API caching reduces repeated backend invocations for cacheable requests but must vary by identity or parameters when data differs.
- Readiness checks prevent premature serving; liveness checks indicate whether the process should be restarted.
Explanation
Correct Answer
D:Readiness checks prevent premature serving; liveness checks indicate whether the process should be restarted. This is the operating principle for Readiness versus liveness health checks. Validation: Start a test container with a delayed dependency and confirm routing waits for readiness without unnecessary restart loops. Scenario: A liveness probe restarts healthy but not-yet-ready containers repeatedly during a slow database migration.
Incorrect Answers
A:Option A explains DynamoDB hot partition avoidance rather than this issue: A hot partition can limit throughput independently of the table's aggregate provisioned or on-demand capacity. It does not explain: A liveness probe restarts healthy but not-yet-ready containers repeatedly during a slow database migration.
B:Option B explains X-Ray distributed trace diagnosis rather than this issue: A distributed trace relates individual service segments and timing to one end-to-end user request. It does not explain: A liveness probe restarts healthy but not-yet-ready containers repeatedly during a slow database migration.
C:Option C explains API Gateway response caching rather than this issue: API caching reduces repeated backend invocations for cacheable requests but must vary by identity or parameters when data differs. It does not explain: A liveness probe restarts healthy but not-yet-ready containers repeatedly during a slow database migration.
Question 135
An incident review asks which unsafe assumption in an AWS implementation must be prevented. A Lambda cannot retrieve its encrypted configuration because its execution role lacks required parameter/KMS permission. Which overlooked failure condition is the central concern?
- Do not send multi-megabyte raw payloads to KMS Encrypt expecting it to replace streaming symmetric encryption.
- Do not assume a Lambda execution role automatically authorizes the state machine to invoke every other AWS service.
- Do not assume bucket-read permissions alone are sufficient for SSE-KMS encrypted objects.
- Do not use a plain String parameter for credentials that require confidentiality and auditing.
Explanation
Correct Answer
D:Do not use a plain String parameter for credentials that require confidentiality and auditing. This is significant because SecureString parameters protect configuration at rest and require appropriate IAM and KMS access when retrieved. Scenario: A Lambda cannot retrieve its encrypted configuration because its execution role lacks required parameter/KMS permission.
Incorrect Answers
A:Option A 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: A Lambda cannot retrieve its encrypted configuration because its execution role lacks required parameter/KMS permission.
B:Option B warns about an unrelated failure boundary (Cross-service execution role in Step Functions): Do not assume a Lambda execution role automatically authorizes the state machine to invoke every other AWS service. It is not the key risk in: A Lambda cannot retrieve its encrypted configuration because its execution role lacks required parameter/KMS permission.
C:Option C warns about an unrelated failure boundary (S3 SSE-KMS encryption key access): Do not assume bucket-read permissions alone are sufficient for SSE-KMS encrypted objects. It is not the key risk in: A Lambda cannot retrieve its encrypted configuration because its execution role lacks required parameter/KMS permission.
Question 136
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A production rollout begins immediately after CodeBuild although company policy requires security review. Which observation is the strongest acceptance evidence?
- Run a safe integration build and confirm production deployment waits for the explicit approval decision.
- Generate tests for a pure function, inject an invalid input, and confirm the resulting assertion catches the bug.
- Replay known API and SQS test events and compare structured outputs and failure handling to expected values.
- Promote a known digest from test to production and compare ECS task image digests after rollout.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Run a safe integration build and confirm production deployment waits for the explicit approval decision. It demonstrates: A pipeline approval action prevents production promotion until a permitted reviewer approves the exact tested revision. Scenario: A production rollout begins immediately after CodeBuild although company policy requires security review.
Incorrect Answers
B:Option B is an acceptance test for Q Developer generated tests verification: Generate tests for a pure function, inject an invalid input, and confirm the resulting assertion catches the bug. It is not direct evidence for: A production rollout begins immediately after CodeBuild although company policy requires security review.
C:Option C is an acceptance test for Test Lambda JSON event fixture: Replay known API and SQS test events and compare structured outputs and failure handling to expected values. It is not direct evidence for: A production rollout begins immediately after CodeBuild although company policy requires security review.
D:Option D is an acceptance test for ECR image digest deployment: Promote a known digest from test to production and compare ECS task image digests after rollout. It is not direct evidence for: A production rollout begins immediately after CodeBuild although company policy requires security review.
Question 137
A cloud developer must explain the mechanism behind a proposed solution. A developer hardcodes a staging API URL in code that is then deployed unchanged to production. Which technical explanation correctly accounts for the solution?
- Lambda memory allocation also changes available CPU resources, so larger memory may lower duration at acceptable cost.
- Reserved concurrency sets a function-level execution ceiling, protecting a constrained target from fanout spikes.
- Environment variables can hold deployment configuration but hardcoded credentials or plaintext output logs create security risks.
- A GSI exposes an alternate partition and optional sort key, with asynchronous index propagation and separate capacity impacts.
Explanation
Correct Answer
C:Environment variables can hold deployment configuration but hardcoded credentials or plaintext output logs create security risks. This is the operating principle for Lambda environment configuration. Validation: Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration. Scenario: A developer hardcodes a staging API URL in code that is then deployed unchanged to production.
Incorrect Answers
A:Option A explains Lambda power tuning rather than this issue: Lambda memory allocation also changes available CPU resources, so larger memory may lower duration at acceptable cost. It does not explain: A developer hardcodes a staging API URL in code that is then deployed unchanged to production.
B:Option B 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 developer hardcodes a staging API URL in code that is then deployed unchanged to production.
D:Option D 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 developer hardcodes a staging API URL in code that is then deployed unchanged to production.
Question 138
A cloud developer must explain the mechanism behind a proposed solution. A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep. Which technical explanation correctly accounts for the solution?
- Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts.
- Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually.
- Local event fixtures and mocks validate code behavior without needing access to production services.
- AI-assisted test generation can reveal omitted cases but generated assertions and mocks must be inspected for false confidence.
Explanation
Correct Answer
A: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 CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
Incorrect Answers
B:Option B explains Deploy test environment with CloudFormation rather than this issue: Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually. It does not explain: A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
C:Option C 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 CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
D:Option D 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: A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
Question 139
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records. Which observation is the strongest acceptance evidence?
- Replay known API and SQS test events and compare structured outputs and failure handling to expected values.
- Deploy a representative load test with the proposed runtime limits and inspect memory and CPU saturation.
- Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier.
- Run a fixture representing missing and valid fields and assert deterministic output and error handling.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Replay known API and SQS test events and compare structured outputs and failure handling to expected values. It demonstrates: A fixture exercises the exact envelope the event source sends, including metadata and nested record structures. Scenario: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
Incorrect Answers
B:Option B is an acceptance test for Application deployment memory sizing: Deploy a representative load test with the proposed runtime limits and inspect memory and CPU saturation. It is not direct evidence for: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
C:Option C is an acceptance test for Git commit and release tagging: Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier. It is not direct evidence for: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
D:Option D is an acceptance test for SAM local unit tests and mocks: Run a fixture representing missing and valid fields and assert deterministic output and error handling. It is not direct evidence for: An SQS Lambda passes a direct-call test but fails in production because the fixture lacks event records.
Question 140
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice. Which observation is the strongest acceptance evidence?
- Compare collected resource IDs against a fixture spanning several result pages including an empty final page.
- Invoke a test API route and assert HTTP status, response headers, and parsed JSON body match the contract.
- Make a test handler run longer than the previous timeout and verify its message is not processed concurrently.
- Execute the key-based query and measure returned items and consumed capacity versus a full scan.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Make a test handler run longer than the previous timeout and verify its message is not processed concurrently. It demonstrates: SQS hides in-flight messages temporarily; expiration permits retries, and deleting early can permanently lose uncommitted work. Scenario: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
Incorrect Answers
A:Option A 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: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
B:Option B is an acceptance test for API Gateway Lambda proxy response format: Invoke a test API route and assert HTTP status, response headers, and parsed JSON body match the contract. It is not direct evidence for: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.
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: An image-conversion worker takes 90 seconds but its SQS message becomes visible after 30 seconds and runs twice.