Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 9
Question 80
A developer manually changes an API Gateway resource outside CloudFormation and deployment behavior diverges. Which implementation approach BEST addresses this requirement?
- Manually edit each resource again after every pipeline run.
- Run CloudFormation drift detection for supported resource types and reconcile unexpected changes into the source template.
- Delete the entire cloud account when one property differs.
- Assume a successful unit test proves there is no stack drift.
Explanation
Correct Answer
B:Run CloudFormation drift detection for supported resource types and reconcile unexpected changes into the source template. IaC tracks declared infrastructure; out-of-band console edits can cause state divergence. A confirming test would show: Drift results identify divergent supported properties and a later deployment restores intended state.
Incorrect Answers
A:Manually edit each resource again after every pipeline run. This suggestion does not establish the required infrastructure drift detection; the relevant risk is that manual configuration changes may be overwritten or missed by the next IaC deployment.
C:Delete the entire cloud account when one property differs. This suggestion does not establish the required infrastructure drift detection; the relevant risk is that manual configuration changes may be overwritten or missed by the next IaC deployment.
D:Assume a successful unit test proves there is no stack drift. This suggestion does not establish the required infrastructure drift detection; the relevant risk is that manual configuration changes may be overwritten or missed by the next IaC deployment.
Question 81
A Kinesis-connected Lambda should process only IoT records with an alarm category to reduce unnecessary invocations. Which implementation approach BEST addresses this requirement?
- Raise the function timeout to filter records automatically.
- Implement EventBridge rule patterns against a queue message with no EventBridge integration.
- Rebuild the DynamoDB table on every event.
- Configure a supported Lambda event source filtering pattern matching the required record fields.
Explanation
Correct Answer
D:Configure a supported Lambda event source filtering pattern matching the required record fields. Event-source filtering applies selection before Lambda invokes the function for supported sources. A confirming test would show: Matching records reach the handler and unrelated records do not produce application processing.
Incorrect Answers
A:Raise the function timeout to filter records automatically. This suggestion does not establish the required Lambda event filtering; the relevant risk is that missing or incorrect event filter patterns cause unwanted work or dropped eligible records.
B:Implement EventBridge rule patterns against a queue message with no EventBridge integration. This suggestion does not establish the required Lambda event filtering; the relevant risk is that missing or incorrect event filter patterns cause unwanted work or dropped eligible records.
C:Rebuild the DynamoDB table on every event. This suggestion does not establish the required Lambda event filtering; the relevant risk is that missing or incorrect event filter patterns cause unwanted work or dropped eligible records.
Question 82
A development workstation authenticates an AWS SDK application and must avoid long-lived keys in code. Which implementation approach BEST addresses this requirement?
- Commit a shared access key in a config JSON file.
- Use the AWS SDK default credential chain with short-lived credentials from an approved profile or federation.
- Disable all credential-expiration checks in the SDK.
- Send credentials in query strings to simplify debugging.
Explanation
Correct Answer
B:Use the AWS SDK default credential chain with short-lived credentials from an approved profile or federation. AWS credential provider chains support ephemeral sessions and remove the need for embedded static secrets. A confirming test would show: The application authenticates using temporary provider credentials and the repository contains no keys.
Incorrect Answers
A:Commit a shared access key in a config JSON file. This suggestion does not establish the required temporary credential storage; the relevant risk is that hardcoded long-lived keys can leak through artifacts and remain usable after local sessions end.
C:Disable all credential-expiration checks in the SDK. This suggestion does not establish the required temporary credential storage; the relevant risk is that hardcoded long-lived keys can leak through artifacts and remain usable after local sessions end.
D:Send credentials in query strings to simplify debugging. This suggestion does not establish the required temporary credential storage; the relevant risk is that hardcoded long-lived keys can leak through artifacts and remain usable after local sessions end.
Question 83
A successful signup must independently notify billing, analytics, and email workers without sequential calls. Which implementation approach BEST addresses this requirement?
- Send events to one shared SQS queue expecting every consumer to see every event.
- Publish the event to SNS and subscribe separate SQS queues for each independently processed concern.
- Call each worker inside one HTTP request.
- Store all consumer tasks in one local thread.
Explanation
Correct Answer
B:Publish the event to SNS and subscribe separate SQS queues for each independently processed concern. SNS fanout plus durable SQS subscriptions decouples independent asynchronous consumers. A confirming test would show: Each subscriber queue receives its own copy and an unavailable worker can process its backlog later.
Incorrect Answers
A:Send events to one shared SQS queue expecting every consumer to see every event. This suggestion does not establish the required SNS fanout delivery; the relevant risk is that invoking each downstream worker synchronously couples availability and latency.
C:Call each worker inside one HTTP request. This suggestion does not establish the required SNS fanout delivery; the relevant risk is that invoking each downstream worker synchronously couples availability and latency.
D:Store all consumer tasks in one local thread. This suggestion does not establish the required SNS fanout delivery; the relevant risk is that invoking each downstream worker synchronously couples availability and latency.
Question 84
A regulated client must encrypt documents before they leave its application boundary. Which implementation approach BEST addresses this requirement?
- Enable SSE-S3 and call it encryption before upload.
- Encode the JSON payload with Base64.
- Encrypt in the client with properly protected keys before uploading ciphertext to storage.
- Put the secret encryption key in the public download URL.
Explanation
Correct Answer
C:Encrypt in the client with properly protected keys before uploading ciphertext to storage. Client-side encryption protects data prior to upload; SSE encrypts it after S3 receives the request. A confirming test would show: Network captures and storage samples contain encrypted payloads before S3 receives them.
Incorrect Answers
A:Enable SSE-S3 and call it encryption before upload. This suggestion does not establish the required client-side versus server-side encryption; the relevant risk is that using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
B:Encode the JSON payload with Base64. This suggestion does not establish the required client-side versus server-side encryption; the relevant risk is that using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
D:Put the secret encryption key in the public download URL. This suggestion does not establish the required client-side versus server-side encryption; the relevant risk is that using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission.
Question 85
A Lambda zip deployment fails at initialization with No module named requests. Which implementation approach BEST addresses this requirement?
- Put dependency names only in a deployment README.
- Increase function concurrency to install dependencies automatically.
- Build the deployment archive with runtime-compatible dependencies at the expected package paths.
- Change CloudWatch log retention to make modules importable.
Explanation
Correct Answer
C:Build the deployment archive with runtime-compatible dependencies at the expected package paths. Zip packages must include importable dependencies in correct paths for the target runtime. A confirming test would show: A deployment smoke test imports all required modules in the deployed Lambda runtime.
Incorrect Answers
A:Put dependency names only in a deployment README. This suggestion does not establish the required Lambda deployment package dependencies; the relevant risk is that missing or wrongly packaged dependencies cause runtime import failures before handler logic runs.
B:Increase function concurrency to install dependencies automatically. This suggestion does not establish the required Lambda deployment package dependencies; the relevant risk is that missing or wrongly packaged dependencies cause runtime import failures before handler logic runs.
D:Change CloudWatch log retention to make modules importable. This suggestion does not establish the required Lambda deployment package dependencies; the relevant risk is that missing or wrongly packaged dependencies cause runtime import failures before handler logic runs.
Question 86
Telemetry events from a million devices need ordered processing for each device and scaled parallel consumers. Which implementation approach BEST addresses this requirement?
- Expect global order across unrelated shards.
- Select a stable partition key for each entity and distribute different keys across Kinesis shards.
- Store streaming checkpoints in browser cookies.
- Publish all records with a single literal partition key.
Explanation
Correct Answer
B:Select a stable partition key for each entity and distribute different keys across Kinesis shards. Kinesis ordering is guaranteed within a shard and partition key choices determine shard affinity. A confirming test would show: Records for one entity remain ordered while shard-level incoming and processing rates stay within quotas.
Incorrect Answers
A:Expect global order across unrelated shards. This suggestion does not establish the required Kinesis shard partitioning; the relevant risk is that using one constant partition key creates a hot shard even when more shards are available.
C:Store streaming checkpoints in browser cookies. This suggestion does not establish the required Kinesis shard partitioning; the relevant risk is that using one constant partition key creates a hot shard even when more shards are available.
D:Publish all records with a single literal partition key. This suggestion does not establish the required Kinesis shard partitioning; the relevant risk is that using one constant partition key creates a hot shard even when more shards are available.
Question 87
A web application cannot tolerate losing all healthy instances during a major version deployment. Which implementation approach BEST addresses this requirement?
- Delete the existing environment before validating the replacement.
- Use an immutable or blue-green deployment strategy and verify replacement health before shifting users.
- Replace all application instances simultaneously during the busiest period.
- Disable enhanced health reporting to hide startup failures.
Explanation
Correct Answer
B:Use an immutable or blue-green deployment strategy and verify replacement health before shifting users. Immutable deployments create replacement capacity to limit in-place update impact. A confirming test would show: New instances become healthy and application checks pass before old capacity is retired.
Incorrect Answers
A:Delete the existing environment before validating the replacement. This suggestion does not establish the required Elastic Beanstalk immutable update; the relevant risk is that an all-at-once update can take the complete fleet offline if the revision fails.
C:Replace all application instances simultaneously during the busiest period. This suggestion does not establish the required Elastic Beanstalk immutable update; the relevant risk is that an all-at-once update can take the complete fleet offline if the revision fails.
D:Disable enhanced health reporting to hide startup failures. This suggestion does not establish the required Elastic Beanstalk immutable update; the relevant risk is that an all-at-once update can take the complete fleet offline if the revision fails.
Question 88
A full-text search endpoint is slow for broad wildcard queries despite healthy application instances. Which implementation approach BEST addresses this requirement?
- Disable index refresh permanently without assessing search freshness.
- Move the query into a browser loop with more requests.
- Inspect query profiles, shard pressure, and index mappings before optimizing the search request.
- Add unused DynamoDB read capacity to reduce OpenSearch shard work.
Explanation
Correct Answer
C:Inspect query profiles, shard pressure, and index mappings before optimizing the search request. Search engine query structure and indexing choices can dominate latency beyond API worker CPU. A confirming test would show: Profile output identifies the costly query phase and a revised query reduces latency under representative load.
Incorrect Answers
A:Disable index refresh permanently without assessing search freshness. This suggestion does not establish the required OpenSearch query performance profiling; the relevant risk is that scaling only the API tier does not correct an expensive OpenSearch query pattern.
B:Move the query into a browser loop with more requests. This suggestion does not establish the required OpenSearch query performance profiling; the relevant risk is that scaling only the API tier does not correct an expensive OpenSearch query pattern.
D:Add unused DynamoDB read capacity to reduce OpenSearch shard work. This suggestion does not establish the required OpenSearch query performance profiling; the relevant risk is that scaling only the API tier does not correct an expensive OpenSearch query pattern.
Question 89
A serverless deployment changes Lambda resource properties and needs predeploy checks. Which implementation approach BEST addresses this requirement?
- Increase Lambda memory to make CloudFormation parse invalid syntax.
- Run sam validate and template linting before packaging and deploying the application.
- Replace SAM validation with an HTTP request to the production API.
- Change a Git branch name to repair invalid YAML.
Explanation
Correct Answer
B:Run sam validate and template linting before packaging and deploying the application. Template validation catches syntactic and supported structural IaC problems but not all runtime behavior. A confirming test would show: Invalid resource declarations fail the validation stage before stack mutation.
Incorrect Answers
A:Increase Lambda memory to make CloudFormation parse invalid syntax. This suggestion does not establish the required SAM template validation; the relevant risk is that a malformed template can fail deployment even if application unit tests pass.
C:Replace SAM validation with an HTTP request to the production API. This suggestion does not establish the required SAM template validation; the relevant risk is that a malformed template can fail deployment even if application unit tests pass.
D:Change a Git branch name to repair invalid YAML. This suggestion does not establish the required SAM template validation; the relevant risk is that a malformed template can fail deployment even if application unit tests pass.
Question 90
An API Gateway route produces 504 responses when an upstream Lambda call takes too long. Which implementation approach BEST addresses this requirement?
- Measure the integration latency and redesign or optimize synchronous work to finish within the API integration limit.
- Set the Lambda function timeout to fifteen minutes and assume API Gateway waits equally long.
- Increase DynamoDB TTL to change HTTP integration deadlines.
- Add random retries to the front end with no timeout diagnosis.
Explanation
Correct Answer
A:Measure the integration latency and redesign or optimize synchronous work to finish within the API integration limit. API integration timeout limits are independent of a Lambda function's own maximum runtime. A confirming test would show: End-to-end traces show the integration completes under the configured limit without gateway timeouts.
Incorrect Answers
B:Set the Lambda function timeout to fifteen minutes and assume API Gateway waits equally long. This suggestion does not establish the required API Gateway Lambda integration timeout; the relevant risk is that a longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout.
C:Increase DynamoDB TTL to change HTTP integration deadlines. This suggestion does not establish the required API Gateway Lambda integration timeout; the relevant risk is that a longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout.
D:Add random retries to the front end with no timeout diagnosis. This suggestion does not establish the required API Gateway Lambda integration timeout; the relevant risk is that a longer Lambda timeout alone does not prevent an earlier API Gateway integration timeout.