AWS Certified Developer - Associate DVA-C02 Practice Test 7
Question 60
A cloud developer must explain the mechanism behind a proposed solution. A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution. Which technical explanation correctly accounts for the solution?
- An inverted text index supports term queries and relevance that primary-key lookups alone cannot provide.
- Runtime compatibility and dependency versions affect import paths and initialization; a layer must match the running function.
- A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors.
- Lambda memory allocation also changes available CPU resources, so larger memory may lower duration at acceptable cost.
Explanation
Correct Answer
D:Lambda memory allocation also changes available CPU resources, so larger memory may lower duration at acceptable cost. This is the operating principle for Lambda power tuning. Validation: Compare duration, memory usage, and invocation cost for two sizes using the same representative workload. Scenario: A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
Incorrect Answers
A:Option A explains OpenSearch text search use case rather than this issue: An inverted text index supports term queries and relevance that primary-key lookups alone cannot provide. It does not explain: A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
B:Option B explains Lambda layers and runtime dependency packaging rather than this issue: Runtime compatibility and dependency versions affect import paths and initialization; a layer must match the running function. It does not explain: A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
C:Option C explains API Gateway Lambda proxy response format rather than this issue: A proxy integration expects a defined response envelope; a plain object or inappropriate body type can cause gateway errors. It does not explain: A JSON transformation Lambda runs slowly with memory available but CPU-constrained execution.
Question 61
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A new event worker produces duplicate refunds when test messages are redelivered after timeouts. Which observation is the strongest acceptance evidence?
- Deploy a representative load test with the proposed runtime limits and inspect memory and CPU saturation.
- Invoke staging and production URLs and confirm each reaches the configured function version or alias.
- Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier.
- Send a controlled duplicate event and a bad record and verify idempotent state and planned retry behavior.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Send a controlled duplicate event and a bad record and verify idempotent state and planned retry behavior. It demonstrates: Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely. Scenario: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
Incorrect Answers
A:Option A 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: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
B:Option B is an acceptance test for API Gateway stage variables and versions: Invoke staging and production URLs and confirm each reaches the configured function version or alias. It is not direct evidence for: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
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: A new event worker produces duplicate refunds when test messages are redelivered after timeouts.
Question 62
A development team must select an AWS application change. An order Lambda times out connecting to a private Aurora endpoint because its security group blocks the port. Which implementation best addresses this situation?
- Use a DynamoDB conditional update based on the expected item version to prevent overwriting concurrent changes.
- Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database.
- Use supported Lambda event-source mapping filters to discard irrelevant records before function invocation.
- Benchmark Lambda memory settings with representative inputs to improve CPU-bound runtime and total cost.
Explanation
Correct Answer
B:VPC-connected Lambda network interfaces need reachable routes and security-group permissions for database connections. Apply: Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database. Acceptance check: Invoke from the Lambda VPC configuration and test an authorized connection to the required database port. Scenario: An order Lambda times out connecting to a private Aurora endpoint because its security group blocks the port.
Incorrect Answers
A:Option A implements a different developer control (DynamoDB conditional writes): Use a DynamoDB conditional update based on the expected item version to prevent overwriting concurrent changes. That does not resolve the specific situation: An order Lambda times out connecting to a private Aurora endpoint because its security group blocks the port.
C:Option C implements a different developer control (Lambda event filtering): Use supported Lambda event-source mapping filters to discard irrelevant records before function invocation. That does not resolve the specific situation: An order Lambda times out connecting to a private Aurora endpoint because its security group blocks the port.
D:Option D implements a different developer control (Lambda power tuning): Benchmark Lambda memory settings with representative inputs to improve CPU-bound runtime and total cost. That does not resolve the specific situation: An order Lambda times out connecting to a private Aurora endpoint because its security group blocks the port.
Question 63
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A Python package runs locally but Lambda cannot import a pinned third-party library absent from the deployment artifact. What test most directly confirms the intended behavior?
- Induce a failing readiness test in the new environment and verify routing returns to the previous one.
- Run a fixture representing missing and valid fields and assert deterministic output and error handling.
- Publish a staging configuration with a forced alarm and verify rollback restores the former configuration version.
- Deploy a minimal test package and invoke the configured handler while checking import resolution.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Deploy a minimal test package and invoke the configured handler while checking import resolution. It demonstrates: Lambda ZIP handlers and imported libraries must exist in locations the configured runtime can load at initialization. Scenario: A Python package runs locally but Lambda cannot import a pinned third-party library absent from the deployment artifact.
Incorrect Answers
A:Option A is an acceptance test for CodeDeploy blue-green rollback: Induce a failing readiness test in the new environment and verify routing returns to the previous one. It is not direct evidence for: A Python package runs locally but Lambda cannot import a pinned third-party library absent from the deployment artifact.
B:Option B 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: A Python package runs locally but Lambda cannot import a pinned third-party library absent from the deployment artifact.
C:Option C is an acceptance test for AppConfig progressive rollout rollback: Publish a staging configuration with a forced alarm and verify rollback restores the former configuration version. It is not direct evidence for: A Python package runs locally but Lambda cannot import a pinned third-party library absent from the deployment artifact.
Question 64
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever. Which observation is the strongest acceptance evidence?
- Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration.
- Trigger a synthetic handler exception and verify retry count and the corresponding on-failure event record.
- Inject one bad Kinesis event and confirm bounded retry behavior, checkpoint position, and failure destination evidence.
- Publish a test layer version, invoke with the exact runtime and CPU architecture, and verify dependencies import.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Inject one bad Kinesis event and confirm bounded retry behavior, checkpoint position, and failure destination evidence. It demonstrates: A stream event-source mapping advances checkpoints after processing; repeated failed batches can stall progress on an affected shard. Scenario: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
Incorrect Answers
A:Option A is an acceptance test for Lambda environment configuration: Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration. It is not direct evidence for: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
B:Option B 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 Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
D:Option D is an acceptance test for Lambda layers and runtime dependency packaging: Publish a test layer version, invoke with the exact runtime and CPU architecture, and verify dependencies import. It is not direct evidence for: A Kinesis Lambda stops making progress because one malformed telemetry record is retried forever.
Question 65
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A build pipeline uses Q Developer to add regression tests but never verifies the test fails for the known defect. What test most directly confirms the intended behavior?
- Commit a safe test change to the selected branch and verify one pipeline execution records the corresponding revision.
- Deploy a deliberately failing canary and verify the alarm stops traffic shifting and restores the stable version.
- Run a fixture representing missing and valid fields and assert deterministic output and error handling.
- Generate tests for a pure function, inject an invalid input, and confirm the resulting assertion catches the bug.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Generate tests for a pure function, inject an invalid input, and confirm the resulting assertion catches the bug. It demonstrates: AI-assisted test generation can reveal omitted cases but generated assertions and mocks must be inspected for false confidence. Scenario: A build pipeline uses Q Developer to add regression tests but never verifies the test fails for the known defect.
Incorrect Answers
A:Option A is an acceptance test for CodePipeline source change trigger: Commit a safe test change to the selected branch and verify one pipeline execution records the corresponding revision. It is not direct evidence for: A build pipeline uses Q Developer to add regression tests but never verifies the test fails for the known defect.
B:Option B is an acceptance test for CodeDeploy canary Lambda traffic shifting: Deploy a deliberately failing canary and verify the alarm stops traffic shifting and restores the stable version. It is not direct evidence for: A build pipeline uses Q Developer to add regression tests but never verifies the test fails for the known defect.
C:Option C 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: A build pipeline uses Q Developer to add regression tests but never verifies the test fails for the known defect.
Question 66
A development team must select an AWS application change. A five-message Lambda invocation processes four payments but retries all five after one malformed event. Which implementation best addresses this situation?
- Serialize application objects with explicit schema, numeric types, and timestamp handling before writing to a data store.
- Configure API Gateway request validators and explicit models to reject invalid payloads before invoking the integration.
- Return failed SQS message identifiers through the supported partial batch response format when processing a Lambda batch.
- Benchmark Lambda memory settings with representative inputs to improve CPU-bound runtime and total cost.
Explanation
Correct Answer
C:Partial batch failure reporting limits retries to failed records if the event-source mapping is configured for that feature. Apply: Return failed SQS message identifiers through the supported partial batch response format when processing a Lambda batch. Acceptance check: Inject one poison message in a five-item batch and verify only failed IDs are retried after successful messages commit. Scenario: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
Incorrect Answers
A:Option A implements a different developer control (Application-level JSON serialization): Serialize application objects with explicit schema, numeric types, and timestamp handling before writing to a data store. That does not resolve the specific situation: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
B:Option B 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 five-message Lambda invocation processes four payments but retries all five after one malformed event.
D:Option D implements a different developer control (Lambda power tuning): Benchmark Lambda memory settings with representative inputs to improve CPU-bound runtime and total cost. That does not resolve the specific situation: A five-message Lambda invocation processes four payments but retries all five after one malformed event.
Question 67
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 service records traces but engineers cannot filter the failing requests by safe order channel. Which observation is the strongest acceptance evidence?
- Invoke repeated identical safe GETs and verify reduced backend calls without serving another user's response.
- Benchmark fixed representative input across several memory configurations and compare p95 duration and unit cost.
- Emit traces with safe test tenant identifiers and synthetic sensitive data; verify useful filtering works while confidential identifiers are excluded from annotations.
- Publish events with different types and verify each queue receives only its matching type.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Emit traces with safe test tenant identifiers and synthetic sensitive data; verify useful filtering works while confidential identifiers are excluded from annotations. It demonstrates: Indexed annotations support filtering traces by defined key-value pairs while metadata can hold less indexed detail. Scenario: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
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: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
B:Option B is an acceptance test for Lambda performance memory cost tuning: Benchmark fixed representative input across several memory configurations and compare p95 duration and unit cost. It is not direct evidence for: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
D:Option D is an acceptance test for SNS subscription filter policy: Publish events with different types and verify each queue receives only its matching type. It is not direct evidence for: A payment service records traces but engineers cannot filter the failing requests by safe order channel.
Question 68
An incident review asks which unsafe assumption in an AWS implementation must be prevented. An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3. Which overlooked failure condition is the central concern?
- Do not commit symmetric encryption keys into a container image that is replicated across development accounts.
- Do not label SSE-S3 as end-to-end client-side encryption that prevents the storage service from seeing plaintext at ingestion.
- Do not equate Lambda execution-role access with permission for every authenticated end user to read every tenant record.
- Do not grant access merely because a token's JSON payload looks syntactically valid without verifying its signature and claims.
Explanation
Correct Answer
B:Do not label SSE-S3 as end-to-end client-side encryption that prevents the storage service from seeing plaintext at ingestion. This is significant because 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
A:Option A warns about an unrelated failure boundary (Encryption key in application config): Do not commit symmetric encryption keys into a container image that is replicated across development accounts. It is not the key risk in: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
C:Option C warns about an unrelated failure boundary (Fine-grained application tenant authorization): Do not equate Lambda execution-role access with permission for every authenticated end user to read every tenant record. It is not the key risk in: An architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
D:Option D 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 architect assumes server-side S3 encryption makes plaintext invisible to all code that sends objects into S3.
Question 69
An incident review asks which unsafe assumption in an AWS implementation must be prevented. A cached profile endpoint returns customer A's data to customer B because authorization context is missing from its cache key. Which overlooked failure condition is the central concern?
- Do not cache personalized account balances under one shared key that omits the authenticated customer.
- Do not fan every unrelated notification to every subscriber and rely solely on expensive handler-side filtering.
- Do not place passwords, PII, or unrestricted high-cardinality secrets into trace annotations.
- Do not enable full unsampled payload traces containing credentials for every production request.
Explanation
Correct Answer
A:Do not cache personalized account balances under one shared key that omits the authenticated customer. This is significant because API caching reduces repeated backend invocations for cacheable requests but must vary by identity or parameters when data differs. Scenario: A cached profile endpoint returns customer A's data to customer B because authorization context is missing from its cache key.
Incorrect Answers
B:Option B warns about an unrelated failure boundary (SNS subscription filter policy): Do not fan every unrelated notification to every subscriber and rely solely on expensive handler-side filtering. It is not the key risk in: A cached profile endpoint returns customer A's data to customer B because authorization context is missing from its cache key.
C:Option C warns about an unrelated failure boundary (X-Ray trace annotations): Do not place passwords, PII, or unrestricted high-cardinality secrets into trace annotations. It is not the key risk in: A cached profile endpoint returns customer A's data to customer B because authorization context is missing from its cache key.
D:Option D warns about an unrelated failure boundary (App-level trace sampling and privacy): Do not enable full unsampled payload traces containing credentials for every production request. It is not the key risk in: A cached profile endpoint returns customer A's data to customer B because authorization context is missing from its cache key.
Question 70
An AWS developer is reviewing the next application release. A new debug release logs bearer tokens in a JSON field that every observability subscriber receives. Which technical change most directly meets the requirement?
- Emit structured JSON logs with timestamp, severity, operation, and correlation ID while redacting sensitive data.
- Compare API Gateway execution and access logs, integration status, and backend logs to isolate client validation from service faults.
- Provide separate application readiness and liveness behavior so traffic is routed only when dependencies are ready.
- Add an SNS subscription filter policy that forwards only matching event attributes or message bodies to a target queue.
Explanation
Correct Answer
A:Machine-readable fields support consistent filtering and cross-service incident timelines without exposing secrets. Apply: Emit structured JSON logs with timestamp, severity, operation, and correlation ID while redacting sensitive data. Acceptance check: Generate an error request and query by correlation ID while verifying PII and tokens were removed. Scenario: A new debug release logs bearer tokens in a JSON field that every observability subscriber receives.
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 new debug release logs bearer tokens in a JSON field that every observability subscriber receives.
C:Option C 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 new debug release logs bearer tokens in a JSON field that every observability subscriber receives.
D:Option D implements a different developer control (SNS subscription filter policy): Add an SNS subscription filter policy that forwards only matching event attributes or message bodies to a target queue. That does not resolve the specific situation: A new debug release logs bearer tokens in a JSON field that every observability subscriber receives.