AWS Certified Developer - Associate DVA-C02 Practice Test 27
Question 260
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep. Which observation is the strongest acceptance evidence?
- Deliberately break a test and confirm the build fails before any deployment stage starts.
- Run a fixture representing missing and valid fields and assert deterministic output and error handling.
- Enable a test flag only in staging and confirm production's flag stays unchanged during rollback.
- Launch a new test stack and compare its logical resources and configured permissions with the reviewed template.
Explanation
Correct Answer
A:The decisive acceptance evidence is: Deliberately break a test and confirm the build fails before any deployment stage starts. It demonstrates: Buildspec phases and runtime images determine how repeatably CI executes tests and packages artifacts. Scenario: A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
Incorrect Answers
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 CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
C:Option C is an acceptance test for AppConfig environment feature flags: Enable a test flag only in staging and confirm production's flag stays unchanged during rollback. It is not direct evidence for: A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
D:Option D is an acceptance test for Deploy test environment with CloudFormation: Launch a new test stack and compare its logical resources and configured permissions with the reviewed template. It is not direct evidence for: A CodeBuild project uploads an artifact despite the npm test command failing in a hidden shell substep.
Question 261
An engineering reviewer is evaluating service behavior and authorization boundaries. An API has two customer applications and accidentally accepts a token intended for the other application's audience. Which mechanism explains the appropriate design decision?
- Role assumption provides temporary scoped credentials instead of embedding static long-lived keys inside deployable code.
- Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely.
- Application secrets should have controlled retrieval, audit, and rotation rather than appearing in plaintext code or build artifacts.
- JWT authorizers check token metadata and claims before invoking protected API routes.
Explanation
Correct Answer
D:JWT authorizers check token metadata and claims before invoking protected API routes. This is the operating principle for API Gateway JWT authorizer scope. Validation: Send a token with a valid signature but missing the required scope and confirm the route rejects it. Scenario: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
Incorrect Answers
A:Option A explains IAM assumed role for workload rather than this issue: Role assumption provides temporary scoped credentials instead of embedding static long-lived keys inside deployable code. It does not explain: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
B:Option B explains Encryption key in application config rather than this issue: Hardcoded encryption keys are copied into builds and cannot be centrally rotated or permission-scoped safely. It does not explain: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
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: An API has two customer applications and accidentally accepts a token intended for the other application's audience.
Question 262
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device. Which observation is the strongest acceptance evidence?
- Send a synthetic request with a fake payment token and confirm only masked values appear in saved logs.
- Rotate a safe test key using supported policy and decrypt ciphertext written with prior key material.
- Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates.
- Scan a sample deployment artifact and prove no plaintext secret keys remain while authorized decryption still works.
Explanation
Correct Answer
D: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: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
Incorrect Answers
A:Option A 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: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
B:Option B is an acceptance test for KMS rotation and encrypted data continuity: Rotate a safe test key using supported policy and decrypt ciphertext written with prior key material. It is not direct evidence for: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
C:Option C is an acceptance test for Cognito bearer-token expiry and refresh: Expire a test access token and confirm the client obtains a permitted replacement or reauthenticates. It is not direct evidence for: A mobile app embeds a single shared AES key in its package to encrypt confidential records on every device.
Question 263
An engineering reviewer is evaluating service behavior and authorization boundaries. An event producer receives acceptance but operators cannot identify failed downstream work without a failure destination. Which mechanism explains the appropriate design decision?
- A state machine preserves workflow state across service calls and makes ordered dependencies and failures observable.
- EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler.
- Asynchronous invocations can retry failed events then route exhausted failures to a configured destination for recovery.
- Jitter spreads retry traffic, while a circuit breaker prevents repeated calls into a persistently failing dependency.
Explanation
Correct Answer
C:Asynchronous invocations can retry failed events then route exhausted failures to a configured destination for recovery. This is the operating principle for Lambda asynchronous failure destination. Validation: Trigger a synthetic handler exception and verify retry count and the corresponding on-failure event record. Scenario: An event producer receives acceptance but operators cannot identify failed downstream work without a failure destination.
Incorrect Answers
A:Option A explains Step Functions orchestration rather than this issue: A state machine preserves workflow state across service calls and makes ordered dependencies and failures observable. It does not explain: An event producer receives acceptance but operators cannot identify failed downstream work without a failure destination.
B:Option B explains EventBridge content-based routing rather than this issue: EventBridge evaluates structured event fields before dispatching to a selected target, unlike a time-based scheduler. It does not explain: An event producer receives acceptance but operators cannot identify failed downstream work without a failure destination.
D:Option D 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: An event producer receives acceptance but operators cannot identify failed downstream work without a failure destination.
Question 264
A development team must select an AWS application change. A debug logger includes the full JWT bearer token in every API error record. Which implementation best addresses this situation?
- Require authenticated tenant IDs in database query keys or conditions rather than accepting a caller-controlled tenant key alone.
- Reference Secrets Manager or Parameter Store for secret values and restrict environment access and log exposure.
- Grant a Step Functions state machine execution role just the service actions needed by its configured tasks.
- Redact or tokenize sensitive customer fields in application logs before emitting structured events to monitoring systems.
Explanation
Correct Answer
D:Observability must retain useful identifiers and failure context without exposing credentials, email addresses, or regulated data. Apply: Redact or tokenize sensitive customer fields in application logs before emitting structured events to monitoring systems. Acceptance check: Send a synthetic request with a fake payment token and confirm only masked values appear in saved logs. Scenario: A debug logger includes the full JWT bearer token in every API error record.
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 debug logger includes the full JWT bearer token in every API error record.
B:Option B implements a different developer control (Secrets in Lambda environment variables): Reference Secrets Manager or Parameter Store for secret values and restrict environment access and log exposure. That does not resolve the specific situation: A debug logger includes the full JWT bearer token in every API error record.
C:Option C implements a different developer control (Cross-service execution role in Step Functions): Grant a Step Functions state machine execution role just the service actions needed by its configured tasks. That does not resolve the specific situation: A debug logger includes the full JWT bearer token in every API error record.
Question 265
A cloud developer must explain the mechanism behind a proposed solution. A production rollback cannot identify which source commit generated its previous working image. Which technical explanation correctly accounts for the solution?
- Traceable source revisions allow a pipeline to rebuild, review, and roll back specific application releases.
- Stages isolate API deployments and allow controlled references to backends without changing client-visible production routes.
- Infrastructure parameters let the same reviewed template create isolated environments with different endpoints and policies.
- Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely.
Explanation
Correct Answer
A:Traceable source revisions allow a pipeline to rebuild, review, and roll back specific application releases. This is the operating principle for Git commit and release tagging. Validation: Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier. Scenario: A production rollback cannot identify which source commit generated its previous working image.
Incorrect Answers
B:Option B 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 production rollback cannot identify which source commit generated its previous working image.
C:Option C explains SAM parameter overrides for staging rather than this issue: Infrastructure parameters let the same reviewed template create isolated environments with different endpoints and policies. It does not explain: A production rollback cannot identify which source commit generated its previous working image.
D:Option D explains Event-driven integration test cases rather than this issue: Asynchronous systems can retry, reorder, or redeliver messages; the integration contract must handle these cases safely. It does not explain: A production rollback cannot identify which source commit generated its previous working image.
Question 266
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails. Which observation is the strongest acceptance evidence?
- Create a safe expired test item and check application filtering independently of background item deletion.
- Force a fulfillment task failure and confirm the state machine retries or reaches the designed compensation path.
- Publish approved and rejected sample order events and confirm only approved events invoke the consumer.
- Deploy test and production aliases and verify each reads the intended nonsecret endpoint configuration.
Explanation
Correct Answer
B:The decisive acceptance evidence is: Force a fulfillment task failure and confirm the state machine retries or reaches the designed compensation path. It demonstrates: A state machine preserves workflow state across service calls and makes ordered dependencies and failures observable. Scenario: A purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
Incorrect Answers
A:Option A is an acceptance test for DynamoDB TTL asynchronous deletion: Create a safe expired test item and check application filtering independently of background item deletion. It is not direct evidence for: A purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
C:Option C 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 purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
D:Option D 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 purchase workflow must reserve inventory, collect payment, and release the reservation if collection fails.
Question 267
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. One region's integration stack works but another fails because its manually created IAM role is missing permissions. Which observation is the strongest acceptance evidence?
- Run a safe integration build and confirm production deployment waits for the explicit approval decision.
- Launch a new test stack and compare its logical resources and configured permissions with the reviewed template.
- 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
B:The decisive acceptance evidence is: Launch a new test stack and compare its logical resources and configured permissions with the reviewed template. It demonstrates: Infrastructure as code allows the same resource relationships to be tested consistently rather than created manually. Scenario: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
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: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
C:Option C is an acceptance test for Integration test API dependency contract: Return simulated 200, 429, and timeout responses from a test service and verify the application's resulting state. It is not direct evidence for: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
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: One region's integration stack works but another fails because its manually created IAM role is missing permissions.
Question 268
A development team must select an AWS application change. An image converter runs three times slower with 128 MB despite having spare account concurrency. Which implementation best addresses this situation?
- Emit structured JSON logs with timestamp, severity, operation, and correlation ID while redacting sensitive data.
- Profile Lambda memory, duration, init time, and total per-invocation cost before choosing a power setting.
- Inspect Lambda runtime initialization and execution logs to distinguish dependency import failures from configured timeouts.
- Configure API Gateway stage caching for eligible stable GET responses with deliberate cache-key parameters and invalidation.
Explanation
Correct Answer
B:Memory setting changes the available CPU budget and can reduce billed duration enough to offset its higher per-time cost. Apply: Profile Lambda memory, duration, init time, and total per-invocation cost before choosing a power setting. Acceptance check: Benchmark fixed representative input across several memory configurations and compare p95 duration and unit cost. Scenario: An image converter runs three times slower with 128 MB despite having spare account concurrency.
Incorrect Answers
A:Option A implements a different developer control (Structured JSON application logging): Emit structured JSON logs with timestamp, severity, operation, and correlation ID while redacting sensitive data. That does not resolve the specific situation: An image converter runs three times slower with 128 MB despite having spare account concurrency.
C:Option C implements a different developer control (Lambda timeout and init error diagnosis): Inspect Lambda runtime initialization and execution logs to distinguish dependency import failures from configured timeouts. That does not resolve the specific situation: An image converter runs three times slower with 128 MB despite having spare account concurrency.
D:Option D implements a different developer control (API Gateway response caching): Configure API Gateway stage caching for eligible stable GET responses with deliberate cache-key parameters and invalidation. That does not resolve the specific situation: An image converter runs three times slower with 128 MB despite having spare account concurrency.
Question 269
A cloud developer must explain the mechanism behind a proposed solution. A search API concatenates a user-entered surname into an SQL WHERE clause and behaves unexpectedly for an apostrophe. Which technical explanation correctly accounts for the solution?
- Input validation and bound parameters prevent user-controlled text from being interpreted as SQL or unsafe output markup.
- User pools handle application sign-in and token issuance; a backend must verify signatures, issuer, token use, and audience or client identity.
- Identity claims determine tenant authorization independently of which resource key a user guesses or sends in a URL.
- IAM policy evaluation combines requested actions, resources, conditions, and explicit denies for each API call.
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 search API concatenates a user-entered surname into an SQL WHERE clause and behaves unexpectedly for an apostrophe.
Incorrect Answers
B:Option B explains Cognito user-pool login tokens rather than this issue: User pools handle application sign-in and token issuance; a backend must verify signatures, issuer, token use, and audience or client identity. It does not explain: A search API concatenates a user-entered surname into an SQL WHERE clause and behaves unexpectedly for an apostrophe.
C:Option C 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 search API concatenates a user-entered surname into an SQL WHERE clause and behaves unexpectedly for an apostrophe.
D:Option D 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: A search API concatenates a user-entered surname into an SQL WHERE clause and behaves unexpectedly for an apostrophe.
Question 270
A staging acceptance reviewer must demonstrate working end-to-end behavior rather than cite a configuration screenshot, using a controlled test before deployment. A production rollback cannot identify which source commit generated its previous working image. Which observation is the strongest acceptance evidence?
- 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.
- Build a test image, inspect its digest, and deploy that exact digest to staging before production promotion.
- Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier.
Explanation
Correct Answer
D:The decisive acceptance evidence is: Deploy a tagged test commit and compare runtime version metadata with the repository commit identifier. It demonstrates: 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 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 production rollback cannot identify which source commit generated its previous working image.
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 production rollback cannot identify which source commit generated its previous working image.
C:Option C 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 production rollback cannot identify which source commit generated its previous working image.