AWS Certified Developer - Associate DVA-C02 Practice Test 57
Question 560
An engineering reviewer is evaluating service behavior and authorization boundaries. A payment event vanishes after a service crash because the worker deletes the queue message before writing the payment record. Which mechanism explains the appropriate design decision?
- Runtime compatibility and dependency versions affect import paths and initialization; a layer must match the running function.
- Event filtering avoids running function code for records that cannot satisfy the configured content condition.
- Asynchronous invocations can retry failed events then route exhausted failures to a configured destination for recovery.
- SQS hides in-flight messages temporarily; expiration permits retries, and deleting early can permanently lose uncommitted work.
Explanation
Correct Answer
D:SQS hides in-flight messages temporarily; expiration permits retries, and deleting early can permanently lose uncommitted work. This is the operating principle for SQS visibility timeout and retries. Validation: Make a test handler run longer than the previous timeout and verify its message is not processed concurrently. Scenario: A payment event vanishes after a service crash because the worker deletes the queue message before writing the payment record.
Incorrect Answers
A:Option A 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 payment event vanishes after a service crash because the worker deletes the queue message before writing the payment record.
B:Option B explains Lambda event filtering rather than this issue: Event filtering avoids running function code for records that cannot satisfy the configured content condition. It does not explain: A payment event vanishes after a service crash because the worker deletes the queue message before writing the payment record.
C:Option C explains Lambda asynchronous failure destination rather than this issue: Asynchronous invocations can retry failed events then route exhausted failures to a configured destination for recovery. It does not explain: A payment event vanishes after a service crash because the worker deletes the queue message before writing the payment record.
Question 561
A production readiness review identifies a potential software defect. An audit queue receives every marketing promotion event although it needs only access-policy changes. Which implementation risk must be rejected first?
- Do not solve an import failure by increasing Lambda timeout or memory without checking the failing phase.
- Do not infer which microservice caused latency solely from aggregate API Gateway response times.
- Do not write an arbitrary JSON number and assume it becomes a CloudWatch metric without EMF declarations.
- Do not fan every unrelated notification to every subscriber and rely solely on expensive handler-side filtering.
Explanation
Correct Answer
D:Do not fan every unrelated notification to every subscriber and rely solely on expensive handler-side filtering. This is significant because Subscription filtering reduces irrelevant deliveries and downstream processing while preserving intended event fanout. Scenario: An audit queue receives every marketing promotion event although it needs only access-policy changes.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (Lambda timeout and init error diagnosis): Do not solve an import failure by increasing Lambda timeout or memory without checking the failing phase. It is not the key risk in: An audit queue receives every marketing promotion event although it needs only access-policy changes.
B:Option B warns about an unrelated failure boundary (X-Ray distributed trace diagnosis): Do not infer which microservice caused latency solely from aggregate API Gateway response times. It is not the key risk in: An audit queue receives every marketing promotion event although it needs only access-policy changes.
C:Option C warns about an unrelated failure boundary (CloudWatch embedded metric format): Do not write an arbitrary JSON number and assume it becomes a CloudWatch metric without EMF declarations. It is not the key risk in: An audit queue receives every marketing promotion event although it needs only access-policy changes.
Question 562
A development team must select an AWS application change. A purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails. Which implementation best addresses this situation?
- Use a Step Functions state machine with explicit task transitions, retries, and failure paths for a multi-step business process.
- Use Amazon OpenSearch Service for full-text indexing and relevance search instead of scanning a key-value table for arbitrary phrases.
- Benchmark Lambda memory settings with representative inputs to improve CPU-bound runtime and total cost.
- Serialize application objects with explicit schema, numeric types, and timestamp handling before writing to a data store.
Explanation
Correct Answer
A:A state machine preserves workflow state across service calls and makes ordered dependencies and failures observable. Apply: Use a Step Functions state machine with explicit task transitions, retries, and failure paths for a multi-step business process. Acceptance check: Force a fulfillment task failure and confirm the state machine retries or reaches the designed compensation path. Scenario: A purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
Incorrect Answers
B:Option B implements a different developer control (OpenSearch text search use case): Use Amazon OpenSearch Service for full-text indexing and relevance search instead of scanning a key-value table for arbitrary phrases. That does not resolve the specific situation: A purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
C:Option C 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 purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
D:Option D 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 purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
Question 563
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 mobile client writes money fields as floating-point JSON and accounting calculations diverge. Which observation is the strongest acceptance evidence?
- Round-trip a fixture with decimals and UTC timestamps and compare exact domain values after deserialization.
- Publish approved and rejected sample order events and confirm only approved events invoke the consumer.
- Write a test item then issue a strong GetItem and confirm the returned version matches the latest commit.
- Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Round-trip a fixture with decimals and UTC timestamps and compare exact domain values after deserialization. It demonstrates: Uncontrolled serialization can change timestamp formats and numeric precision, breaking later readers. Scenario: A new mobile client writes money fields as floating-point JSON and accounting calculations diverge.
Incorrect Answers
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 new mobile client writes money fields as floating-point JSON and accounting calculations diverge.
C:Option C 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 new mobile client writes money fields as floating-point JSON and accounting calculations diverge.
D:Option D is an acceptance test for S3 object events and duplicate handling: Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed. It is not direct evidence for: A new mobile client writes money fields as floating-point JSON and accounting calculations diverge.
Question 564
A development team must select an AWS application change. A SaaS backend queries an order by supplied orderId and exposes a different customer's order. Which implementation best addresses this situation?
- Enforce tenant identity and resource ownership inside application authorization logic before returning any row or object.
- Limit an application IAM policy to the exact required actions and resource ARN scope, including prefixes when supported.
- Use STS AssumeRole with explicit cross-account trust and a permission policy granting only the required resource access.
- Use a supported KMS data key and encrypt large application payloads locally with a data encryption algorithm.
Explanation
Correct Answer
A:AWS IAM service permission may authorize a Lambda to read the table but does not automatically enforce end-user tenant boundaries. Apply: Enforce tenant identity and resource ownership inside application authorization logic before returning any row or object. Acceptance check: Invoke the same API with two customer identities and verify neither can retrieve the other's object identifiers. Scenario: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
Incorrect Answers
B:Option B implements a different developer control (IAM least-privilege resource ARN): Limit an application IAM policy to the exact required actions and resource ARN scope, including prefixes when supported. That does not resolve the specific situation: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
C:Option C implements a different developer control (Cross-account STS role trust): Use STS AssumeRole with explicit cross-account trust and a permission policy granting only the required resource access. That does not resolve the specific situation: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
D:Option D implements a different developer control (KMS envelope encryption pattern): Use a supported KMS data key and encrypt large application payloads locally with a data encryption algorithm. That does not resolve the specific situation: A SaaS backend queries an order by supplied orderId and exposes a different customer's order.
Question 565
A development team must select an AWS application change. A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections. Which implementation best addresses this situation?
- Configure Lambda reserved concurrency to bound function scale when a downstream dependency has a limited connection budget.
- Use a DynamoDB conditional update based on the expected item version to prevent overwriting concurrent changes.
- Handle S3 object-created notifications through an idempotent processor keyed to the object event or processing state.
- Return failed SQS message identifiers through the supported partial batch response format when processing a Lambda batch.
Explanation
Correct Answer
A:Reserved concurrency sets a function-level execution ceiling, protecting a constrained target from fanout spikes. Apply: Configure Lambda reserved concurrency to bound function scale when a downstream dependency has a limited connection budget. Acceptance check: Send a burst of test invocations and confirm concurrent executions remain below the database connection threshold. Scenario: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
Incorrect Answers
B:Option B 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: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
C:Option C implements a different developer control (S3 object events and duplicate handling): Handle S3 object-created notifications through an idempotent processor keyed to the object event or processing state. That does not resolve the specific situation: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
D:Option D implements a different developer control (Lambda partial batch failures for SQS): Return failed SQS message identifiers through the supported partial batch response format when processing a Lambda batch. That does not resolve the specific situation: A traffic burst launches hundreds of Lambdas against a database that permits only a few dozen connections.
Question 566
A production readiness review identifies a potential software defect. A production rollback cannot identify which source commit generated its previous working image. Which implementation risk must be rejected first?
- Do not test an SQS-triggered Lambda with a bare business JSON object that omits the Records envelope.
- Do not run destructive HTTP tests against the production custom domain because stages were not separated.
- Do not build from an untracked developer workstation or reuse a mutable release tag for unrelated code.
- Do not approve a stack update without checking that a stateful resource will not be replaced unexpectedly.
Explanation
Correct Answer
C:Do not build from an untracked developer workstation or reuse a mutable release tag for unrelated code. This is significant because Traceable source revisions allow a pipeline to rebuild, review, and roll back specific application releases. Scenario: A production rollback cannot identify which source commit generated its previous working image.
Incorrect Answers
A:Option A 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 production rollback cannot identify which source commit generated its previous working image.
B:Option B warns about an unrelated failure boundary (API Gateway staging endpoint verification): Do not run destructive HTTP tests against the production custom domain because stages were not separated. It is not the key risk in: A production rollback cannot identify which source commit generated its previous working image.
D:Option D 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 production rollback cannot identify which source commit generated its previous working image.
Question 567
A cloud developer must explain the mechanism behind a proposed solution. An SDK client sends customer PII to an HTTPS endpoint but its custom adapter ignores certificate verification. Which technical explanation correctly accounts for the solution?
- IAM policy evaluation combines requested actions, resources, conditions, and explicit denies for each API call.
- TLS protects data in transit and server-authentication checks prevent connecting to an impostor endpoint.
- Input validation and bound parameters prevent user-controlled text from being interpreted as SQL or unsafe output markup.
- KMS authorization evaluates key resource policies and grants alongside caller identity permissions, subject to explicit denies.
Explanation
Correct Answer
B:TLS protects data in transit and server-authentication checks prevent connecting to an impostor endpoint. This is the operating principle for TLS server identity validation. Validation: Connect to a trusted endpoint and deliberately invalid certificate and verify the invalid peer is rejected. Scenario: An SDK client sends customer PII to an HTTPS endpoint but its custom adapter ignores certificate verification.
Incorrect Answers
A:Option A explains IAM least-privilege resource ARN rather than this issue: IAM policy evaluation combines requested actions, resources, conditions, and explicit denies for each API call. It does not explain: An SDK client sends customer PII to an HTTPS endpoint but its custom adapter ignores certificate verification.
C:Option C explains Input sanitization before data persistence rather than this issue: Input validation and bound parameters prevent user-controlled text from being interpreted as SQL or unsafe output markup. It does not explain: An SDK client sends customer PII to an HTTPS endpoint but its custom adapter ignores certificate verification.
D:Option D explains KMS key policy and IAM permission rather than this issue: KMS authorization evaluates key resource policies and grants alongside caller identity permissions, subject to explicit denies. It does not explain: An SDK client sends customer PII to an HTTPS endpoint but its custom adapter ignores certificate verification.
Question 568
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. A service trace logs private access tokens as metadata rather than safe nonsecret correlation fields. What test most directly confirms the intended behavior?
- Send a synthetic failed-checkout metric and confirm its namespace, dimension, and value are queryable.
- Reproduce a denied test call and identify the principal, attempted API action, resource, and denial context.
- Generate repeated traceable requests and confirm sampled segments include correlation but not secrets.
- Trigger a safe known error then query its request ID and confirm the exception and affected service appear.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Generate repeated traceable requests and confirm sampled segments include correlation but not secrets. It demonstrates: Sampling limits tracing volume while secure context propagation and data minimization preserve observability integrity. Scenario: A service trace logs private access tokens as metadata rather than safe nonsecret correlation fields.
Incorrect Answers
A:Option A is an acceptance test for CloudWatch embedded metric format: Send a synthetic failed-checkout metric and confirm its namespace, dimension, and value are queryable. It is not direct evidence for: A service trace logs private access tokens as metadata rather than safe nonsecret correlation fields.
B:Option B is an acceptance test for IAM AccessDenied CloudTrail triage: Reproduce a denied test call and identify the principal, attempted API action, resource, and denial context. It is not direct evidence for: A service trace logs private access tokens as metadata rather than safe nonsecret correlation fields.
D:Option D is an acceptance test for CloudWatch Logs Insights fault search: Trigger a safe known error then query its request ID and confirm the exception and affected service appear. It is not direct evidence for: A service trace logs private access tokens as metadata rather than safe nonsecret correlation fields.
Question 569
A development team must select an AWS application change. One region's integration stack works but another fails because its manually created IAM role is missing permissions. Which implementation best addresses this situation?
- Deploy a versioned CloudFormation or SAM template to create reproducible integration test resources.
- Use a staging environment with stubbed vendor responses to verify both success and failure branches of an integration.
- Use Amazon Q Developer to suggest additional automated tests and review their assertions against real requirements before accepting them.
- Store environment-scoped feature flags in AWS AppConfig and deploy them using a validated application configuration strategy.
Explanation
Correct Answer
A:Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually. Apply: Deploy a versioned CloudFormation or SAM template to create reproducible integration test resources. Acceptance check: Launch a new test stack and compare its logical resources and configured permissions with the reviewed template. Scenario: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
Incorrect Answers
B:Option B implements a different developer control (Integration test API dependency contract): Use a staging environment with stubbed vendor responses to verify both success and failure branches of an integration. That does not resolve the specific situation: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
C:Option C implements a different developer control (Q Developer generated tests verification): Use Amazon Q Developer to suggest additional automated tests and review their assertions against real requirements before accepting them. That does not resolve the specific situation: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
D:Option D implements a different developer control (AppConfig environment feature flags): Store environment-scoped feature flags in AWS AppConfig and deploy them using a validated application configuration strategy. That does not resolve the specific situation: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
Question 570
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. An ECS container starts in staging but repeatedly exits under production traffic because its memory limit is too low. Which observation is the strongest acceptance evidence?
- Publish two versions and verify the staging alias routes to the expected one without modifying production.
- Induce a failing readiness test in the new environment and verify routing returns to the previous one.
- Deploy a representative load test with the proposed runtime limits and inspect memory and CPU saturation.
- Send a controlled duplicate event and a bad record and verify idempotent state and planned retry behavior.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Deploy a representative load test with the proposed runtime limits and inspect memory and CPU saturation. It demonstrates: An artifact can build successfully while its runtime resource limits lead to OOM or throttled execution after release. Scenario: An ECS container starts in staging but repeatedly exits under production traffic because its memory limit is too low.
Incorrect Answers
A:Option A is an acceptance test for Lambda aliases for versioned test routing: Publish two versions and verify the staging alias routes to the expected one without modifying production. It is not direct evidence for: An ECS container starts in staging but repeatedly exits under production traffic because its memory limit is too low.
B:Option B 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: An ECS container starts in staging but repeatedly exits under production traffic because its memory limit is too low.
D:Option D is an acceptance test for Event-driven integration test cases: Send a controlled duplicate event and a bad record and verify idempotent state and planned retry behavior. It is not direct evidence for: An ECS container starts in staging but repeatedly exits under production traffic because its memory limit is too low.