Amazon AWS Certified Developer - Associate DVA-C02 Practice Test 53
Question 520
An IaC-managed stack has configuration differences from its recorded template. The incident review finds the following problem: Manual configuration changes may be overwritten or missed by the next IaC deployment. What is the BEST targeted corrective action?
- Delete the entire cloud account when one property differs.
- Assume a successful unit test proves there is no stack drift.
- Review drift, update the template when changes are valid, and redeploy controlled state.
- Manually edit each resource again after every pipeline run.
Explanation
Correct Answer
C:Review drift, update the template when changes are valid, and redeploy controlled state. This directly addresses the recorded infrastructure drift detection failure and should be checked by observing that drift results identify divergent supported properties and a later deployment restores intended state.
Incorrect Answers
A:Delete the entire cloud account when one property differs. This does not repair the identified infrastructure drift detection failure; the targeted remediation is to review drift, update the template when changes are valid, and redeploy controlled state.
B:Assume a successful unit test proves there is no stack drift. This does not repair the identified infrastructure drift detection failure; the targeted remediation is to review drift, update the template when changes are valid, and redeploy controlled state.
D:Manually edit each resource again after every pipeline run. This does not repair the identified infrastructure drift detection failure; the targeted remediation is to review drift, update the template when changes are valid, and redeploy controlled state.
Question 521
An email worker subscribed to a shared SNS topic must ignore order telemetry messages. The incident review finds the following problem: Without a filter the subscriber receives unrelated messages and spends capacity rejecting them. What is the BEST targeted corrective action?
- Increase the Lambda timeout so SNS filters events automatically.
- Put every event into one SQS message body without useful filter fields.
- Set the correct filter policy and include required publisher attributes in test messages.
- Remove all subscriber policies and expect SNS to infer business intent.
Explanation
Correct Answer
C:Set the correct filter policy and include required publisher attributes in test messages. This directly addresses the recorded SNS subscription filter policy failure and should be checked by observing that only events matching the subscriber's policy reach its target while other topics of work are skipped.
Incorrect Answers
A:Increase the Lambda timeout so SNS filters events automatically. This does not repair the identified SNS subscription filter policy failure; the targeted remediation is to set the correct filter policy and include required publisher attributes in test messages.
B:Put every event into one SQS message body without useful filter fields. This does not repair the identified SNS subscription filter policy failure; the targeted remediation is to set the correct filter policy and include required publisher attributes in test messages.
D:Remove all subscriber policies and expect SNS to infer business intent. This does not repair the identified SNS subscription filter policy failure; the targeted remediation is to set the correct filter policy and include required publisher attributes in test messages.
Question 522
A popular key expires during a promotion and every worker requests the same expensive database value. The incident review finds the following problem: Simultaneous expiry of a hot key can cause redundant backend load even with a high steady-state hit rate. What is the BEST targeted corrective action?
- Increase retry storms at the database when cache misses surge.
- Coalesce refresh requests and stagger expirations while preserving a correctness fallback.
- Remove cache invalidation and hold every value forever.
- Set all popular cache keys to expire at the same exact second.
Explanation
Correct Answer
B:Coalesce refresh requests and stagger expirations while preserving a correctness fallback. This directly addresses the recorded application cache stampede failure and should be checked by observing that cache-miss burst metrics shrink and backend query rates stay controlled during expiration.
Incorrect Answers
A:Increase retry storms at the database when cache misses surge. This does not repair the identified application cache stampede failure; the targeted remediation is to coalesce refresh requests and stagger expirations while preserving a correctness fallback.
C:Remove cache invalidation and hold every value forever. This does not repair the identified application cache stampede failure; the targeted remediation is to coalesce refresh requests and stagger expirations while preserving a correctness fallback.
D:Set all popular cache keys to expire at the same exact second. This does not repair the identified application cache stampede failure; the targeted remediation is to coalesce refresh requests and stagger expirations while preserving a correctness fallback.
Question 523
A feature branch needs a disposable serverless stack with test-only API endpoints. The incident review finds the following problem: Sharing production tables with integration tests can corrupt real data. What is the BEST targeted corrective action?
- Reuse the production queue URL because it is convenient.
- Run destructive integration tests on the production table.
- Parameterize and deploy disposable test resources with strict cleanup and role scope.
- Let test code select resource names from untrusted user input.
Explanation
Correct Answer
C:Parameterize and deploy disposable test resources with strict cleanup and role scope. This directly addresses the recorded stage-isolated integration stack failure and should be checked by observing that integration tests use temporary resource ARNs and cleanup leaves production resources unchanged.
Incorrect Answers
A:Reuse the production queue URL because it is convenient. This does not repair the identified stage-isolated integration stack failure; the targeted remediation is to parameterize and deploy disposable test resources with strict cleanup and role scope.
B:Run destructive integration tests on the production table. This does not repair the identified stage-isolated integration stack failure; the targeted remediation is to parameterize and deploy disposable test resources with strict cleanup and role scope.
D:Let test code select resource names from untrusted user input. This does not repair the identified stage-isolated integration stack failure; the targeted remediation is to parameterize and deploy disposable test resources with strict cleanup and role scope.
Question 524
A VPC-attached Lambda accesses an internal service on private subnets and receives connection timeouts. The incident review finds the following problem: Missing security-group or routing rules prevent TCP access to a private endpoint. What is the BEST targeted corrective action?
- Correct subnet selection and security-group ingress/egress for the private service.
- Put database credentials in a public API Gateway stage variable.
- Make the RDS instance publicly accessible by default.
- Replace the execution role with broad IAM access to repair TCP connectivity.
Explanation
Correct Answer
A:Correct subnet selection and security-group ingress/egress for the private service. This directly addresses the recorded Lambda VPC private data access failure and should be checked by observing that network tests confirm outbound connectivity from the function to the private endpoint on its service port.
Incorrect Answers
B:Put database credentials in a public API Gateway stage variable. This does not repair the identified Lambda VPC private data access failure; the targeted remediation is to correct subnet selection and security-group ingress/egress for the private service.
C:Make the RDS instance publicly accessible by default. This does not repair the identified Lambda VPC private data access failure; the targeted remediation is to correct subnet selection and security-group ingress/egress for the private service.
D:Replace the execution role with broad IAM access to repair TCP connectivity. This does not repair the identified Lambda VPC private data access failure; the targeted remediation is to correct subnet selection and security-group ingress/egress for the private service.
Question 525
A client uploads confidential data and needs the server never to receive unencrypted object bytes. The incident review finds the following problem: Using only S3 server-side encryption does not satisfy a requirement to encrypt before transmission. What is the BEST targeted corrective action?
- Encode the JSON payload with Base64.
- Encrypt client-side before upload and manage decryption keys independently of the stored object.
- Enable SSE-S3 and call it encryption before upload.
- Put the secret encryption key in the public download URL.
Explanation
Correct Answer
B:Encrypt client-side before upload and manage decryption keys independently of the stored object. This directly addresses the recorded client-side versus server-side encryption failure and should be checked by observing that network captures and storage samples contain encrypted payloads before S3 receives them.
Incorrect Answers
A:Encode the JSON payload with Base64. This does not repair the identified client-side versus server-side encryption failure; the targeted remediation is to encrypt client-side before upload and manage decryption keys independently of the stored object.
C:Enable SSE-S3 and call it encryption before upload. This does not repair the identified client-side versus server-side encryption failure; the targeted remediation is to encrypt client-side before upload and manage decryption keys independently of the stored object.
D:Put the secret encryption key in the public download URL. This does not repair the identified client-side versus server-side encryption failure; the targeted remediation is to encrypt client-side before upload and manage decryption keys independently of the stored object.
Question 526
A product system routes events to different consumers based on detail-type and account metadata. The incident review finds the following problem: A producer hardcoded to one downstream endpoint cannot independently route new event types. What is the BEST targeted corrective action?
- Treat EventBridge as a relational database query engine.
- Configure every event to invoke every target irrespective of type.
- Add or correct the EventBridge event pattern and rule target with delivery failure monitoring.
- Put filtering logic only in the front-end browser.
Explanation
Correct Answer
C:Add or correct the EventBridge event pattern and rule target with delivery failure monitoring. This directly addresses the recorded EventBridge event routing failure and should be checked by observing that rule-matching events reach the intended targets while nonmatching event types do not.
Incorrect Answers
A:Treat EventBridge as a relational database query engine. This does not repair the identified EventBridge event routing failure; the targeted remediation is to add or correct the EventBridge event pattern and rule target with delivery failure monitoring.
B:Configure every event to invoke every target irrespective of type. This does not repair the identified EventBridge event routing failure; the targeted remediation is to add or correct the EventBridge event pattern and rule target with delivery failure monitoring.
D:Put filtering logic only in the front-end browser. This does not repair the identified EventBridge event routing failure; the targeted remediation is to add or correct the EventBridge event pattern and rule target with delivery failure monitoring.
Question 527
A repository pipeline must catch malformed SAM definitions before creating cloud resources. The incident review finds the following problem: A malformed template can fail deployment even if application unit tests pass. What is the BEST targeted corrective action?
- Increase Lambda memory to make CloudFormation parse invalid syntax.
- Change a Git branch name to repair invalid YAML.
- Fix template schema errors and rerun validation plus a controlled change-set review.
- Replace SAM validation with an HTTP request to the production API.
Explanation
Correct Answer
C:Fix template schema errors and rerun validation plus a controlled change-set review. This directly addresses the recorded SAM template validation failure and should be checked by observing that invalid resource declarations fail the validation stage before stack mutation.
Incorrect Answers
A:Increase Lambda memory to make CloudFormation parse invalid syntax. This does not repair the identified SAM template validation failure; the targeted remediation is to fix template schema errors and rerun validation plus a controlled change-set review.
B:Change a Git branch name to repair invalid YAML. This does not repair the identified SAM template validation failure; the targeted remediation is to fix template schema errors and rerun validation plus a controlled change-set review.
D:Replace SAM validation with an HTTP request to the production API. This does not repair the identified SAM template validation failure; the targeted remediation is to fix template schema errors and rerun validation plus a controlled change-set review.
Question 528
A partner application must call an AWS API in a customer account for a limited session. The incident review finds the following problem: A correct permission policy without an allowed trust relationship cannot be assumed. What is the BEST targeted corrective action?
- Add only an S3 bucket tag and expect STS authorization to change.
- Copy the destination account's root keys into the source account.
- Allow any AWS principal in the role trust policy.
- Fix the role trust principal and narrow permissions, then request temporary credentials via STS.
Explanation
Correct Answer
D:Fix the role trust principal and narrow permissions, then request temporary credentials via STS. This directly addresses the recorded IAM STS AssumeRole cross-account failure and should be checked by observing that cloudTrail shows the expected assumed role session and only the allowed target-account API actions succeed.
Incorrect Answers
A:Add only an S3 bucket tag and expect STS authorization to change. This does not repair the identified IAM STS AssumeRole cross-account failure; the targeted remediation is to fix the role trust principal and narrow permissions, then request temporary credentials via STS.
B:Copy the destination account's root keys into the source account. This does not repair the identified IAM STS AssumeRole cross-account failure; the targeted remediation is to fix the role trust principal and narrow permissions, then request temporary credentials via STS.
C:Allow any AWS principal in the role trust policy. This does not repair the identified IAM STS AssumeRole cross-account failure; the targeted remediation is to fix the role trust principal and narrow permissions, then request temporary credentials via STS.
Question 529
A service opens IAM-authenticated RDS connections over TLS with short-lived login tokens. The incident review finds the following problem: A correct IAM token without database user setup or TLS configuration can still fail to connect. What is the BEST targeted corrective action?
- Store the database master password in every function's source code.
- Disable database-side access controls because IAM auth exists.
- Configure IAM auth and the mapped DB user, token generation, and certificate validation.
- Use a Cognito user-pool token as the database password.
Explanation
Correct Answer
C:Configure IAM auth and the mapped DB user, token generation, and certificate validation. This directly addresses the recorded IAM authentication and TLS for RDS failure and should be checked by observing that authenticated connections accept fresh tokens for the mapped database user and reject unauthorized principals.
Incorrect Answers
A:Store the database master password in every function's source code. This does not repair the identified IAM authentication and TLS for RDS failure; the targeted remediation is to configure IAM auth and the mapped DB user, token generation, and certificate validation.
B:Disable database-side access controls because IAM auth exists. This does not repair the identified IAM authentication and TLS for RDS failure; the targeted remediation is to configure IAM auth and the mapped DB user, token generation, and certificate validation.
D:Use a Cognito user-pool token as the database password. This does not repair the identified IAM authentication and TLS for RDS failure; the targeted remediation is to configure IAM auth and the mapped DB user, token generation, and certificate validation.
Question 530
An image-processing queue has a handful of permanently invalid payloads that consume every available retry. The incident review finds the following problem: Without redrive, poison messages are repeatedly delivered and hide useful errors. What is the BEST targeted corrective action?
- Increase batch size indefinitely without isolating failures.
- Delete all failures before preserving diagnostics.
- Route exhausted messages to the DLQ and inspect the payload and failure before redrive.
- Use an SNS topic subscription as a replacement for failed-message storage.
Explanation
Correct Answer
C:Route exhausted messages to the DLQ and inspect the payload and failure before redrive. This directly addresses the recorded SQS dead-letter queues failure and should be checked by observing that poisoned messages appear in the DLQ after the chosen receives while valid events continue.
Incorrect Answers
A:Increase batch size indefinitely without isolating failures. This does not repair the identified SQS dead-letter queues failure; the targeted remediation is to route exhausted messages to the DLQ and inspect the payload and failure before redrive.
B:Delete all failures before preserving diagnostics. This does not repair the identified SQS dead-letter queues failure; the targeted remediation is to route exhausted messages to the DLQ and inspect the payload and failure before redrive.
D:Use an SNS topic subscription as a replacement for failed-message storage. This does not repair the identified SQS dead-letter queues failure; the targeted remediation is to route exhausted messages to the DLQ and inspect the payload and failure before redrive.