AWS Certified Developer - Associate DVA-C02 Practice Test 30
Question 290
A production readiness review identifies a potential software defect. A finance service rotates a KMS key and worries that existing encrypted receipts will instantly become unreadable. Which implementation risk must be rejected first?
- Do not print full retrieved passwords into CloudWatch logs when troubleshooting an authentication failure.
- Do not commit symmetric encryption keys into a container image that is replicated across development accounts.
- Do not delete a KMS key immediately after rotation while historical encrypted data still requires its key.
- Do not equate Lambda execution-role access with permission for every authenticated end user to read every tenant record.
Explanation
Correct Answer
C:Do not delete a KMS key immediately after rotation while historical encrypted data still requires its key. This is significant because For supported symmetric KMS keys, older key material remains available to decrypt ciphertext when key rotation occurs. Scenario: A finance service rotates a KMS key and worries that existing encrypted receipts will instantly become unreadable.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (Secrets Manager credential rotation): Do not print full retrieved passwords into CloudWatch logs when troubleshooting an authentication failure. It is not the key risk in: A finance service rotates a KMS key and worries that existing encrypted receipts will instantly become unreadable.
B:Option B 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: A finance service rotates a KMS key and worries that existing encrypted receipts will instantly become unreadable.
D:Option D 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: A finance service rotates a KMS key and worries that existing encrypted receipts will instantly become unreadable.
Question 291
A production readiness review identifies a potential software defect. A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once. Which implementation risk must be rejected first?
- Do not attach an x86-compiled dependency layer to an incompatible arm64 function.
- Do not assume each uploaded object generates one perfectly ordered processing attempt.
- Do not delete a queue item before its database transaction commits or set the visibility timeout shorter than routine processing.
- Do not implement high-frequency user lookups using a table-wide Scan for a small matching subset.
Explanation
Correct Answer
B:Do not assume each uploaded object generates one perfectly ordered processing attempt. This is significant because S3 event notifications can be duplicated and ordering is not guaranteed; handlers must defend against repeated effects. Scenario: A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
Incorrect Answers
A:Option A warns about an unrelated failure boundary (Lambda layers and runtime dependency packaging): Do not attach an x86-compiled dependency layer to an incompatible arm64 function. It is not the key risk in: A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
C:Option C warns about an unrelated failure boundary (SQS visibility timeout and retries): Do not delete a queue item before its database transaction commits or set the visibility timeout shorter than routine processing. It is not the key risk in: A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
D:Option D warns about an unrelated failure boundary (DynamoDB query versus scan): Do not implement high-frequency user lookups using a table-wide Scan for a small matching subset. It is not the key risk in: A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
Question 292
An engineering reviewer is evaluating service behavior and authorization boundaries. A comment app prints raw user HTML into admin pages and permits script execution on a saved record. Which mechanism explains the appropriate design decision?
- Input validation and bound parameters prevent user-controlled text from being interpreted as SQL or unsafe output markup.
- KMS GenerateDataKey returns key material and an encrypted key blob; the client uses the plaintext key only transiently for data encryption.
- Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts.
- Secret versions can rotate independently of a code deployment, while clients must handle cached credential updates.
Explanation
Correct Answer
A:Input validation and bound parameters prevent user-controlled text from being interpreted as SQL or unsafe output markup. This is the operating principle for Input sanitization before data persistence. Validation: Submit strings with quotes and markup into a safe test API and confirm storage and output remain correctly encoded. Scenario: A comment app prints raw user HTML into admin pages and permits script execution on a saved record.
Incorrect Answers
B:Option B explains KMS envelope encryption pattern rather than this issue: KMS GenerateDataKey returns key material and an encrypted key blob; the client uses the plaintext key only transiently for data encryption. It does not explain: A comment app prints raw user HTML into admin pages and permits script execution on a saved record.
C:Option C explains Secrets in Lambda environment variables rather than this issue: Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts. It does not explain: A comment app prints raw user HTML into admin pages and permits script execution on a saved record.
D:Option D 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: A comment app prints raw user HTML into admin pages and permits script execution on a saved record.
Question 293
A cloud developer must explain the mechanism behind a proposed solution. An ECS deployment unexpectedly picks up a new library because the image always uses latest as its tag. Which technical explanation correctly accounts for the solution?
- Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions.
- Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts.
- Integration tests check how components interact through the expected API contract, including timeouts and malformed responses.
- Separate API stages let developers exercise route changes without directing tests at production functions and data.
Explanation
Correct Answer
A:Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions. This is the operating principle for Container image dependency pinning. Validation: Build a test image, inspect its digest, and deploy that exact digest to staging before production promotion. Scenario: An ECS deployment unexpectedly picks up a new library because the image always uses latest as its tag.
Incorrect Answers
B:Option B explains CodeBuild integration test environment rather than this issue: Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts. It does not explain: An ECS deployment unexpectedly picks up a new library because the image always uses latest as its tag.
C:Option C explains Integration test API dependency contract rather than this issue: Integration tests check how components interact through the expected API contract, including timeouts and malformed responses. It does not explain: An ECS deployment unexpectedly picks up a new library because the image always uses latest as its tag.
D:Option D explains API Gateway staging endpoint verification rather than this issue: Separate API stages let developers exercise route changes without directing tests at production functions and data. It does not explain: An ECS deployment unexpectedly picks up a new library because the image always uses latest as its tag.
Question 294
An engineering reviewer is evaluating service behavior and authorization boundaries. A container task needs temporary access to a DynamoDB table and must not share the deployment engineer's credentials. Which mechanism explains the appropriate design decision?
- Input validation and bound parameters prevent user-controlled text from being interpreted as SQL or unsafe output markup.
- Identity claims determine tenant authorization independently of which resource key a user guesses or sends in a URL.
- Role assumption provides temporary scoped credentials instead of embedding static long-lived keys inside deployable code.
- KMS authorization evaluates key resource policies and grants alongside caller identity permissions, subject to explicit denies.
Explanation
Correct Answer
C:Role assumption provides temporary scoped credentials instead of embedding static long-lived keys inside deployable code. This is the operating principle for IAM assumed role for workload. Validation: Assume the application role from a test workload and confirm only the required AWS API actions succeed. Scenario: A container task needs temporary access to a DynamoDB table and must not share the deployment engineer's credentials.
Incorrect Answers
A:Option A 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: A container task needs temporary access to a DynamoDB table and must not share the deployment engineer's credentials.
B:Option B explains Multi-tenant partitioning guard rather than this issue: Identity claims determine tenant authorization independently of which resource key a user guesses or sends in a URL. It does not explain: A container task needs temporary access to a DynamoDB table and must not share the deployment engineer's credentials.
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 container task needs temporary access to a DynamoDB table and must not share the deployment engineer's credentials.
Question 295
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once. Which observation is the strongest acceptance evidence?
- Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed.
- Send malformed and valid API calls and confirm only conforming requests reach the target Lambda.
- Update a catalog price and verify clients see the new value after the correct invalidation or TTL rule.
- Inject one poison message in a five-item batch and verify only failed IDs are retried after successful messages commit.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Trigger duplicate object notifications and verify exactly one logical downstream ingest result is committed. It demonstrates: S3 event notifications can be duplicated and ordering is not guaranteed; handlers must defend against repeated effects. Scenario: A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
Incorrect Answers
B:Option B 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 thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
C:Option C 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 thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
D:Option D is an acceptance test for Lambda partial batch failures for SQS: Inject one poison message in a five-item batch and verify only failed IDs are retried after successful messages commit. It is not direct evidence for: A thumbnail worker processes the same new JPEG twice because its S3 notification is delivered more than once.
Question 296
An independent QA lead must observe a reproducible before-and-after result with controlled test inputs prior to signing the release. An application deployment shares a plaintext service encryption key through an environment YAML file in Git. What test most directly confirms the intended behavior?
- Invoke a test function and verify a sensitive value is never emitted in its response or CloudWatch logs.
- Send a synthetic request with a fake payment token and confirm only masked values appear in saved logs.
- Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works.
- Request another tenant's document using a forged URL parameter and confirm it is rejected before data retrieval.
Explanation
Correct Answer
C:The decisive acceptance evidence is: Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works. It demonstrates: Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely. Scenario: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
Incorrect Answers
A:Option A is an acceptance test for Secrets in Lambda environment variables: Invoke a test function and verify a sensitive value is never emitted in its response or CloudWatch logs. It is not direct evidence for: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
B:Option B is an acceptance test for PII masking in application logs: Send a synthetic request with a fake payment token and confirm only masked values appear in saved logs. It is not direct evidence for: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
D:Option D is an acceptance test for Multi-tenant partitioning guard: Request another tenant's document using a forged URL parameter and confirm it is rejected before data retrieval. It is not direct evidence for: An application deployment shares a plaintext service encryption key through an environment YAML file in Git.
Question 297
An engineering reviewer is evaluating service behavior and authorization boundaries. A staging webhook changes behavior during a test because someone edited unversioned Lambda code. Which mechanism explains the appropriate design decision?
- A version is immutable and an alias identifies which reviewed version receives traffic for the environment.
- Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions.
- Stages isolate API deployments and allow controlled references to backends without changing client-visible production routes.
- Tags can move, whereas a digest identifies specific image content that can be validated across environments.
Explanation
Correct Answer
A:A version is immutable and an alias identifies which reviewed version receives traffic for the environment. This is the operating principle for Lambda aliases for versioned test routing. Validation: Publish two versions and verify the staging alias routes to the expected one without modifying production. Scenario: A staging webhook changes behavior during a test because someone edited unversioned Lambda code.
Incorrect Answers
B:Option B explains Container image dependency pinning rather than this issue: Immutable image tags or digests help ensure test and production run exactly the reviewed code and package versions. It does not explain: A staging webhook changes behavior during a test because someone edited unversioned Lambda code.
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 staging webhook changes behavior during a test because someone edited unversioned Lambda code.
D:Option D explains ECR image digest deployment rather than this issue: Tags can move, whereas a digest identifies specific image content that can be validated across environments. It does not explain: A staging webhook changes behavior during a test because someone edited unversioned Lambda code.
Question 298
An engineering reviewer is evaluating service behavior and authorization boundaries. A retailer adjusts discounts but checkout still shows the previous price because cache entries outlive the policy window. Which mechanism explains the appropriate design decision?
- Sampling limits tracing volume while secure context propagation and data minimization preserve observability integrity.
- Caching lowers backend latency and read load, but TTL and invalidation determine how stale a user response can become.
- Indexed annotations support filtering traces by defined key-value pairs while metadata can hold less indexed detail.
- Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually.
Explanation
Correct Answer
B:Caching lowers backend latency and read load, but TTL and invalidation determine how stale a user response can become. This is the operating principle for ElastiCache invalidation and TTL. Validation: Update a product's price in a test store and confirm the cached result is refreshed within the approved policy. Scenario: A retailer adjusts discounts but checkout still shows the previous price because cache entries outlive the policy window.
Incorrect Answers
A:Option A explains App-level trace sampling and privacy rather than this issue: Sampling limits tracing volume while secure context propagation and data minimization preserve observability integrity. It does not explain: A retailer adjusts discounts but checkout still shows the previous price because cache entries outlive the policy window.
C:Option C explains X-Ray trace annotations rather than this issue: Indexed annotations support filtering traces by defined key-value pairs while metadata can hold less indexed detail. It does not explain: A retailer adjusts discounts but checkout still shows the previous price because cache entries outlive the policy window.
D:Option D explains CloudWatch Logs Insights fault search rather than this issue: Structured log fields and time filters let engineers isolate relevant exceptions rather than searching every log line manually. It does not explain: A retailer adjusts discounts but checkout still shows the previous price because cache entries outlive the policy window.
Question 299
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. An inventory app lists only the first thousand objects although the bucket contains many more entries. Which observation is the strongest acceptance evidence?
- Query the new index by the alternate key and verify projections and update propagation match application needs.
- Compare duration, memory usage, and invocation cost for two sizes using the same representative workload.
- Replay the same payment event twice and verify a single business transaction is persisted.
- Compare collected resource IDs against a fixture spanning several result pages including an empty final page.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Compare collected resource IDs against a fixture spanning several result pages including an empty final page. It demonstrates: Many List operations return partial pages and a next token; stopping at the first response produces silent omissions. Scenario: An inventory app lists only the first thousand objects although the bucket contains many more entries.
Incorrect Answers
A:Option A is an acceptance test for DynamoDB global secondary index design: Query the new index by the alternate key and verify projections and update propagation match application needs. It is not direct evidence for: An inventory app lists only the first thousand objects although the bucket contains many more entries.
B:Option B is an acceptance test for Lambda power tuning: Compare duration, memory usage, and invocation cost for two sizes using the same representative workload. It is not direct evidence for: An inventory app lists only the first thousand objects although the bucket contains many more entries.
C:Option C 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: An inventory app lists only the first thousand objects although the bucket contains many more entries.
Question 300
A production readiness review identifies a potential software defect. An inventory app lists only the first thousand objects although the bucket contains many more entries. Which implementation risk must be rejected first?
- Do not assume a successful first API response contains every item in a large account.
- Do not mistake a permissive API proxy route for enforcement of required fields and body types.
- Do not repeatedly skip failed stream events without a recovery plan or assume a failed batch cannot delay later records.
- Do not expect DynamoDB exact-key lookups to offer ranked text queries across free-form documents.
Explanation
Correct Answer
A:Do not assume a successful first API response contains every item in a large account. This is significant because Many List operations return partial pages and a next token; stopping at the first response produces silent omissions. Scenario: An inventory app lists only the first thousand objects although the bucket contains many more entries.
Incorrect Answers
B:Option B warns about an unrelated failure boundary (API Gateway request validation): Do not mistake a permissive API proxy route for enforcement of required fields and body types. It is not the key risk in: An inventory app lists only the first thousand objects although the bucket contains many more entries.
C:Option C 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: An inventory app lists only the first thousand objects although the bucket contains many more entries.
D:Option D 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: An inventory app lists only the first thousand objects although the bucket contains many more entries.