AWS Certified Developer - Associate DVA-C02 Practice Test 51
Question 500
An AWS developer is reviewing the next application release. A function caches a rotated database password forever and all new connections fail the next day. Which technical change most directly meets the requirement?
- Require authenticated tenant IDs in database query keys or conditions rather than accepting a caller-controlled tenant key alone.
- Attach an ACM-managed certificate matching the custom domain to the intended supported API or load balancer endpoint.
- Read database credentials from Secrets Manager and validate supported rotation to avoid hardcoded passwords in application configuration.
- Store supported application secrets as encrypted Parameter Store SecureString parameters and control read/decrypt permissions.
Explanation
Correct Answer
C:Secret versions can rotate independently of a code deployment, while clients must handle cached credential updates. Apply: Read database credentials from Secrets Manager and validate supported rotation to avoid hardcoded passwords in application configuration. Acceptance check: 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
A:Option A implements a different developer control (Multi-tenant partitioning guard): Require authenticated tenant IDs in database query keys or conditions rather than accepting a caller-controlled tenant key alone. That does not resolve the specific situation: A function caches a rotated database password forever and all new connections fail the next day.
B:Option B implements a different developer control (AWS Certificate Manager HTTPS certificate binding): Attach an ACM-managed certificate matching the custom domain to the intended supported API or load balancer endpoint. That does not resolve the specific situation: A function caches a rotated database password forever and all new connections fail the next day.
D:Option D implements a different developer control (AWS Systems Manager Parameter Store secure strings): Store supported application secrets as encrypted Parameter Store SecureString parameters and control read/decrypt permissions. That does not resolve the specific situation: A function caches a rotated database password forever and all new connections fail the next day.
Question 501
A cloud developer must explain the mechanism behind a proposed solution. A new checkout Lambda causes elevated errors when deployed to every user at once without a gradual rollout. Which technical explanation correctly accounts for the solution?
- AI-assisted test generation can reveal omitted cases but generated assertions and mocks must be inspected for false confidence.
- CodeDeploy can send a limited share of traffic to a new version and shift more only after healthy checks.
- Stages isolate API deployments and allow controlled references to backends without changing client-visible production routes.
- Local event fixtures and mocks validate code behavior without needing access to production services.
Explanation
Correct Answer
B:CodeDeploy can send a limited share of traffic to a new version and shift more only after healthy checks. This is the operating principle for CodeDeploy canary Lambda traffic shifting. Validation: Deploy a deliberately failing canary and verify the alarm stops traffic shifting and restores the stable version. Scenario: A new checkout Lambda causes elevated errors when deployed to every user at once without a gradual rollout.
Incorrect Answers
A:Option A 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 new checkout Lambda causes elevated errors when deployed to every user at once without a gradual rollout.
C:Option C explains API Gateway stage variables and versions rather than this issue: Stages isolate API deployments and allow controlled references to backends without changing client-visible production routes. It does not explain: A new checkout Lambda causes elevated errors when deployed to every user at once without a gradual rollout.
D:Option D 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 new checkout Lambda causes elevated errors when deployed to every user at once without a gradual rollout.
Question 502
A production readiness review identifies a potential software defect. A public checkout API accepts requests without a required product ID and invokes Lambda before failing. Which implementation risk must be rejected first?
- Do not expect DynamoDB exact-key lookups to offer ranked text queries across free-form documents.
- Do not choose the smallest Lambda memory solely for low per-millisecond memory price without measuring duration.
- Do not mistake a permissive API proxy route for enforcement of required fields and body types.
- Do not claim a global secondary index supports strongly consistent reads.
Explanation
Correct Answer
C:Do not mistake a permissive API proxy route for enforcement of required fields and body types. This is significant because Validation at the API boundary can reject missing required fields and unsuitable request shapes before backend code runs. Scenario: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (OpenSearch text search use case): Do not expect DynamoDB exact-key lookups to offer ranked text queries across free-form documents. It is not the key risk in: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
B:Option B warns about an unrelated failure boundary (Lambda power tuning): Do not choose the smallest Lambda memory solely for low per-millisecond memory price without measuring duration. It is not the key risk in: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
D:Option D warns about an unrelated failure boundary (DynamoDB strong read consistency): Do not claim a global secondary index supports strongly consistent reads. It is not the key risk in: A public checkout API accepts requests without a required product ID and invokes Lambda before failing.
Question 503
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A user-profile API scans a million items to retrieve one account by accountId. Which observation is the strongest acceptance evidence?
- Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed.
- Execute the key-based query and measure returned items and consumed capacity versus a full scan.
- Load test a representative key distribution and inspect throttling by partition-key pattern.
- Send malformed and valid API calls and confirm only conforming requests reach the target Lambda.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Execute the key-based query and measure returned items and consumed capacity versus a full scan. It demonstrates: Query narrows access by indexed key whereas Scan reads broadly and incurs unnecessary capacity and latency. Scenario: A user-profile API scans a million items to retrieve one account by accountId.
Incorrect Answers
A:Option A 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 user-profile API scans a million items to retrieve one account by accountId.
C:Option C is an acceptance test for DynamoDB partition key hot spots: Load test a representative key distribution and inspect throttling by partition-key pattern. It is not direct evidence for: A user-profile API scans a million items to retrieve one account by accountId.
D:Option D is an acceptance test for API Gateway request validation: Send malformed and valid API calls and confirm only conforming requests reach the target Lambda. It is not direct evidence for: A user-profile API scans a million items to retrieve one account by accountId.
Question 504
A cloud developer must explain the mechanism behind a proposed solution. Two operators update the same inventory counter and the later write overwrites the first change. Which technical explanation correctly accounts for the solution?
- SNS fanout distributes an event to multiple subscribed endpoints without making independent workers compete for one queue message.
- Jitter spreads retry traffic, while a circuit breaker prevents repeated calls into a persistently failing dependency.
- ConditionExpression checks an item state atomically at write time, supporting optimistic concurrency control.
- Many List operations return partial pages and a next token; stopping at the first response produces silent omissions.
Explanation
Correct Answer
C:ConditionExpression checks an item state atomically at write time, supporting optimistic concurrency control. This is the operating principle for DynamoDB conditional writes. Validation: Race two updates with the same old version and verify only one succeeds while the other receives a conditional error. Scenario: Two operators update the same inventory counter and the later write overwrites the first change.
Incorrect Answers
A:Option A explains SNS topic fanout rather than this issue: SNS fanout distributes an event to multiple subscribed endpoints without making independent workers compete for one queue message. It does not explain: Two operators update the same inventory counter and the later write overwrites the first change.
B:Option B explains Third-party API retries with jitter rather than this issue: Jitter spreads retry traffic, while a circuit breaker prevents repeated calls into a persistently failing dependency. It does not explain: Two operators update the same inventory counter and the later write overwrites the first change.
D:Option D explains AWS SDK paginator use rather than this issue: Many List operations return partial pages and a next token; stopping at the first response produces silent omissions. It does not explain: Two operators update the same inventory counter and the later write overwrites the first change.
Question 505
An engineering reviewer is evaluating service behavior and authorization boundaries. A single-page app stores bearer tokens forever even after an administrator revokes the user's session. Which mechanism explains the appropriate design decision?
- Access tokens have bounded validity, and refresh flows must respect revocation and client configuration.
- The response serializer can enforce an allowlist for sensitive fields after identity and authorization checks.
- AWS IAM service permission may authorize a Lambda to read the table but does not automatically enforce end-user tenant boundaries.
- KMS authorization evaluates key resource policies and grants alongside caller identity permissions, subject to explicit denies.
Explanation
Correct Answer
A:Access tokens have bounded validity, and refresh flows must respect revocation and client configuration. This is the operating principle for Cognito bearer-token expiry and refresh. Validation: Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates. Scenario: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
Incorrect Answers
B:Option B 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: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
C:Option C explains Fine-grained application tenant authorization rather than this issue: AWS IAM service permission may authorize a Lambda to read the table but does not automatically enforce end-user tenant boundaries. It does not explain: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
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: A single-page app stores bearer tokens forever even after an administrator revokes the user's session.
Question 506
A production readiness review identifies a potential software defect. A Python Lambda crashes on import after a shared native library layer is built for the wrong architecture. Which implementation risk must be rejected first?
- Do not attach an x86-compiled dependency layer to an incompatible arm64 function.
- Do not deploy assistant-generated credentials, insecure SQL, or untested changes solely on a model recommendation.
- Do not return an unwrapped application object when API Gateway expects a Lambda proxy response envelope.
- Do not repeatedly skip failed stream events without a recovery plan or assume a failed batch cannot delay later records.
Explanation
Correct Answer
A:Do not attach an x86-compiled dependency layer to an incompatible arm64 function. This is significant because Runtime compatibility and dependency versions affect import paths and initialization; a layer must match the running function. Scenario: A Python Lambda crashes on import after a shared native library layer is built for the wrong architecture.
Incorrect Answers
B:Option B warns about an unrelated failure boundary (Amazon Q Developer generated code review): Do not deploy assistant-generated credentials, insecure SQL, or untested changes solely on a model recommendation. It is not the key risk in: A Python Lambda crashes on import after a shared native library layer is built for the wrong architecture.
C:Option C warns about an unrelated failure boundary (API Gateway Lambda proxy response format): Do not return an unwrapped application object when API Gateway expects a Lambda proxy response envelope. It is not the key risk in: A Python Lambda crashes on import after a shared native library layer is built for the wrong architecture.
D:Option D warns about an unrelated failure boundary (Lambda stream checkpoint retries): Do not repeatedly skip failed stream events without a recovery plan or assume a failed batch cannot delay later records. It is not the key risk in: A Python Lambda crashes on import after a shared native library layer is built for the wrong architecture.
Question 507
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A multitenant shopping app stores every cart under the same partition key and sees throttled peak writes. Which observation is the strongest acceptance evidence?
- Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed.
- Make a test handler run longer than the previous timeout and verify its message is not processed concurrently.
- Load test a representative key distribution and inspect throttling by partition-key pattern.
- Update a catalog price and verify clients see the new value after the correct invalidation or TTL rule.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Load test a representative key distribution and inspect throttling by partition-key pattern. It demonstrates: A narrow or concentrated partition key can create hot partitions and throttling even when table capacity is sufficient. Scenario: A multitenant shopping app stores every cart under the same partition key and sees throttled peak writes.
Incorrect Answers
A:Option A 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 multitenant shopping app stores every cart under the same partition key and sees throttled peak writes.
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 multitenant shopping app stores every cart under the same partition key and sees throttled peak writes.
D:Option D is an acceptance test for ElastiCache read-through cache: Update a catalog price and verify clients see the new value after the correct invalidation or TTL rule. It is not direct evidence for: A multitenant shopping app stores every cart under the same partition key and sees throttled peak writes.
Question 508
A production readiness review identifies a potential software defect. A QA engineer invokes a test POST and accidentally charges a real customer due to a shared production integration. Which implementation risk must be rejected first?
- Do not reuse a production bucket or KMS key parameter during a disposable integration test stack deployment.
- Do not run destructive HTTP tests against the production custom domain because stages were not separated.
- Do not represent a passing build stage as a substitute for the organization's required release approval.
- Do not point a staging custom domain at production Lambda by accident during testing.
Explanation
Correct Answer
B:Do not run destructive HTTP tests against the production custom domain because stages were not separated. This is significant because Separate API stages let developers exercise route changes without directing tests at production functions and data. Scenario: A QA engineer invokes a test POST and accidentally charges a real customer due to a shared production integration.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (SAM parameter overrides for staging): Do not reuse a production bucket or KMS key parameter during a disposable integration test stack deployment. It is not the key risk in: A QA engineer invokes a test POST and accidentally charges a real customer due to a shared production integration.
C:Option C 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 QA engineer invokes a test POST and accidentally charges a real customer due to a shared production integration.
D:Option D warns about an unrelated failure boundary (API Gateway stage variables and versions): Do not point a staging custom domain at production Lambda by accident during testing. It is not the key risk in: A QA engineer invokes a test POST and accidentally charges a real customer due to a shared production integration.
Question 509
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A supplier changes an API field and the checkout pipeline deploys despite passing isolated function unit tests. Which observation is the strongest acceptance evidence?
- Run a safe integration build and confirm production deployment waits for the explicit approval decision.
- Promote a known digest from test to production and compare ECS task image digests after rollout.
- Return simulated 200, 429, and timeout responses from a test service and verify the application's resulting state.
- 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: Return simulated 200, 429, and timeout responses from a test service and verify the application's resulting state. It demonstrates: Integration tests check how components interact through the expected API contract, including timeouts and malformed responses. Scenario: A supplier changes an API field and the checkout pipeline deploys despite passing isolated function unit tests.
Incorrect Answers
A:Option A is an acceptance test for CodePipeline cross-stage approval: Run a safe integration build and confirm production deployment waits for the explicit approval decision. It is not direct evidence for: A supplier changes an API field and the checkout pipeline deploys despite passing isolated function unit tests.
B:Option B 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 supplier changes an API field and the checkout pipeline deploys despite passing isolated function unit tests.
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 supplier changes an API field and the checkout pipeline deploys despite passing isolated function unit tests.
Question 510
An AWS developer is reviewing the next application release. An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators. Which technical change most directly meets the requirement?
- Configure asynchronous Lambda invocation failure destinations and bounded retries to preserve failure evidence.
- Catch typed retryable AWS SDK service errors and handle terminal authorization or input failures separately.
- Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes.
- Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database.
Explanation
Correct Answer
B:The SDK can report throttling, transient failures, and permanent access denials that require different client behavior. Apply: Catch typed retryable AWS SDK service errors and handle terminal authorization or input failures separately. Acceptance check: Simulate throttling, invalid input, and access-denied responses and verify only transient cases enter controlled retry logic. Scenario: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
Incorrect Answers
A:Option A implements a different developer control (Lambda asynchronous failure destination): Configure asynchronous Lambda invocation failure destinations and bounded retries to preserve failure evidence. That does not resolve the specific situation: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
C:Option C implements a different developer control (SNS topic fanout): Publish an event to an SNS topic and subscribe the independent SQS queues that each downstream application consumes. That does not resolve the specific situation: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.
D:Option D implements a different developer control (Lambda VPC connectivity to private data): Attach Lambda to appropriate VPC subnets and security groups with verified routes to its private database. That does not resolve the specific situation: An order API retries a denied S3 write repeatedly instead of reporting a permission fault to operators.