Question 300
A business critical API uses Lambda and SQS. Unexpected bursts of failed messages cause the event source mapping to consume most account concurrency and delay unrelated synchronous functions. What isolation setting matters?
- Cap the consumer Lambda reserved concurrency and, where suitable, configure SQS event-source maximum concurrency with DLQ handling.
- Increase SQS message retention but leave Lambda concurrency entirely unbounded for the misbehaving consumer.
- Raise every unrelated Lambda function timeout without limiting the problematic event-source concurrency.
- Increase the Lambda account concurrency quota alone while keeping the problem function’s event-source consumption unbounded.
Explanation
Correct Answer
A:Bounding consumption isolates shared account capacity while source throttling and failure redrive protect downstream systems and unrelated functions.
Incorrect Answers
B:Message retention controls recoverable time, not how much simultaneous execution capacity a function monopolizes.
C:Longer runtimes can worsen resource contention and do not reserve protected execution capacity for other services.
D:A larger shared quota can increase total workload but does not provide a dedicated maximum for the problematic consumer to protect unrelated functions.
Question 301
An order reservation service uses RDS PostgreSQL. Each application task opens a new connection during a flash sale, overwhelming the database connection limit even though CPU capacity remains adequate. Which component should reduce connection churn?
- Enable RDS Multi-AZ failover protection and assume it multiplexes client sessions across a smaller set of database backend connections.
- Increase the number of Lambda or ECS clients without measuring or bounding their database connection allocation.
- Introduce RDS Proxy with suitable authentication and pooling, and keep application queries within supported multiplexing constraints.
- Configure Aurora reader replicas for connection-heavy writes to RDS PostgreSQL without changing client session creation.
Explanation
Correct Answer
C:RDS Proxy pools client connections and manages backend database connection demand from highly concurrent application workers.
Incorrect Answers
A:Multi-AZ provides availability but is not an application connection pool proxy; client connection fan-out remains.
B:Additional parallel clients can intensify the documented connection exhaustion.
D:Read replicas can offload eligible reads but are not a managed connection pool for the single writer’s burst of SQL clients.
Question 302
A payment ledger processes messages from an SQS FIFO queue. Two merchants share one message group identifier, so a slow transaction for one merchant blocks the other despite sufficient consumers. The business only requires ordering within each merchant. How should message grouping change?
- Assign a stable FIFO message group ID per merchant so different merchants can be processed independently while preserving each merchant’s order.
- Use one global message group ID forever because FIFO queues provide parallelism within a single group.
- Drop MessageGroupId entirely from every FIFO message and assume the queue derives merchant identity from its body.
- Replace FIFO with a standard queue and promise the application that all messages will arrive in strict per-merchant order.
Explanation
Correct Answer
A:FIFO ordering is guaranteed per message group, so separating independent tenants improves concurrency without losing their within-group sequence.
Incorrect Answers
B:One ordered group serializes all its messages and cannot provide independent merchant processing concurrency.
C:FIFO sends require suitable message group metadata, and absent grouping does not establish tenant ordering.
D:Standard queues do not guarantee the requested per-merchant FIFO delivery order.
Question 303
A payments application uses an SQS FIFO queue and relies on its built-in deduplication window. It occasionally receives the same external request again hours after the first delivery, causing a duplicate charge. What additional guarantee must the application implement?
- Delete failed-message logs and rely on SQS message bodies to prevent duplicate external side effects.
- Increase message visibility timeout to several days and assume it prevents later independent duplicate enqueues.
- Keep a durable application idempotency record keyed by the business transaction beyond the queue’s finite deduplication interval.
- Assume MessageDeduplicationId blocks repeats forever regardless of queue retention or time elapsed.
Explanation
Correct Answer
C:SQS FIFO deduplication is window-bounded and cannot prevent the same payment request from being replayed hours later.
Incorrect Answers
A:Logging changes do not enforce a durable uniqueness decision at the payment processor.
B:Visibility timeout controls in-flight messages, not distinct future sends with the same business identifier.
D:The deduplication mechanism is bounded and not an indefinite business transaction uniqueness ledger.
Question 304
A shared SQS standard dead-letter queue in a security account receives messages from an approved set of four source queues. An audit finds that other queues are allowed to name the same DLQ in their redrive policies, even though security wants to limit which source queues may target it. The original queue redrive thresholds and consumer retry flow already work. What policy should the DLQ owner configure?
- Restrict iam:SendMessage permissions on the SQS DLQ but leave the redrive allow policy open to any source queue.
- Change only the source queue visibility timeout while leaving the DLQ redrive allow policy open to all source queues.
- Configure a restrictive queue resource policy based only on SendMessage principals, without setting the DLQ redrive allow policy.
- Set the DLQ redrive allow policy to the by-queue mode and name the four approved source queue ARNs, maintaining the existing source redrive policies.
Explanation
Correct Answer
D:SQS redrive allow policies are configured on the destination DLQ and can restrict which source queues are permitted to use it, independently of per-source maxReceiveCount.
Incorrect Answers
A:IAM send restrictions are distinct from configuring which source queues may designate a DLQ through its redrive-allow policy.
B:Visibility timeout controls in-flight redelivery; it does not enforce source-queue allowlisting for DLQ association.
C:A queue policy governs API authorization, but the source-queue DLQ association allowlist is managed by its separate redrive allow policy.
Question 305
An SQS-triggered Lambda handler receives batches of ten messages. One invalid item fails, but the other nine succeed. The current code raises a general exception, causing all ten to be retried and producing duplicate completed work. Which event-source feature reduces unnecessary retries?
- Decrease visibility timeout below function processing time so multiple consumers race the same batch.
- Increase batch size indefinitely and keep throwing one generic error for the entire batch.
- Return the batch item failure identifiers using the supported SQS partial batch response pattern and keep handlers idempotent.
- Add a DLQ for poison messages but continue returning a general Lambda exception for all ten SQS records in each failed batch.
Explanation
Correct Answer
C:Partial batch responses let successful items be acknowledged while only failed messages are retried.
Incorrect Answers
A:Premature visibility expiration worsens duplicate processing and does not identify individual failed items.
B:Larger all-or-nothing batches amplify the number of successfully processed items retried after one failure.
D:A DLQ captures eventual failures but does not selectively acknowledge successful batch records and avoid their repeated delivery during retries.
Question 306
A polling consumer calls SQS ReceiveMessage tens of thousands of times per hour, almost always receiving an empty response because messages arrive only sporadically. Reliability is healthy, but needless API traffic and idle polling cost are high. Which receive setting should be used?
- Increase the SQS message visibility timeout while keeping ReceiveMessage WaitTimeSeconds at zero.
- Enable SQS long polling with a suitable WaitTimeSeconds and appropriate client timeout, reducing empty receives.
- Raise the ReceiveMessage MaxNumberOfMessages value but continue issuing immediate short-poll requests with WaitTimeSeconds zero.
- Enable content-based deduplication on an SQS FIFO queue and assume it changes the wait behavior of empty ReceiveMessage calls.
Explanation
Correct Answer
B:Long polling with WaitTimeSeconds greater than zero (up to 20 seconds) waits for messages, reducing empty and false-empty responses; the HTTP client timeout must exceed the polling wait.
Incorrect Answers
A:Visibility timeout applies to already received in-flight messages; it does not cause an empty ReceiveMessage API call to wait for new arrivals.
C:Larger batches can reduce calls when messages exist, but without a positive wait time, sparse arrivals still cause repeated empty short-poll requests.
D:FIFO deduplication handles repeat message submission semantics, not receive-request wait duration or empty poll frequency.
Question 307
A Lambda function is invoked asynchronously by EventBridge. A downstream outage makes the invocation fail after the configured retry policy, and engineers need an actionable record of the final failure outside the function’s own logs. Which event handling feature should be used?
- Enable an EventBridge rule DLQ only for failure to deliver the event to the Lambda service and assume it also captures every function execution error after acceptance.
- Configure an appropriate Lambda asynchronous failure destination or dead-letter queue and monitor the delivery and replay process.
- Increase the Lambda function timeout to its maximum and assume failed event records are automatically available forever.
- Enable CloudWatch Logs retention and treat log messages as a durable asynchronous Lambda failure-event destination.
Explanation
Correct Answer
B:Async invocation failure destinations or DLQs preserve failure context after retries, enabling controlled remediation.
Incorrect Answers
A:An EventBridge delivery DLQ protects rule-target invocation delivery failures, not all accepted asynchronous Lambda runtime failures after invocation.
C:A longer timeout does not create durable post-retry failure handling.
D:Logs may aid investigation but do not guarantee a routable failure record and original invocation context after retries are exhausted.
Question 308
An RDS for MySQL Multi-AZ deployment performs an automatic failover, but a Java application continues connecting to the old writer address due to indefinitely cached DNS and stale connection pools. What application resilience behavior should change?
- Use supported endpoint DNS re-resolution with a bounded JVM DNS TTL and connection retry/pool recycling behavior so applications reconnect to the promoted primary.
- Hard-code the original writer private IP address permanently in the application settings to bypass RDS endpoint DNS changes.
- Disable all connection retries because managed Multi-AZ database failover guarantees uninterrupted existing TCP sessions.
- Increase the Java JDBC pool maximum connections while keeping DNS lookups cached indefinitely and failed connections pinned to the old writer.
Explanation
Correct Answer
A:Multi-AZ failover moves the RDS writer behind its DNS endpoint and breaks existing connections; AWS recommends refreshing JVM DNS lookups (TTL no greater than 60 seconds) and applications must reconnect or recycle stale sockets.
Incorrect Answers
B:Failover changes the writer’s reachable private address; hard-coding an old IP bypasses the endpoint update and prevents recovery.
C:Failover interrupts current connections; bounded retries and fresh endpoint resolution are required rather than assuming TCP continuity.
D:Pool size affects number of client connections but leaves both stale socket references and indefinitely cached outdated DNS addresses unchanged.
Question 309
A stateless ALB service suddenly adds replacement EC2 instances under Auto Scaling. The new targets pass a basic health check before their local caches have warmed, so a full load share causes high latency. Which ALB target group feature should be considered?
- Force all requests to only the oldest target indefinitely, preventing any replacement instance from serving users.
- Increase the ALB idle timeout, expecting it to gradually alter per-target request weights during target warmup.
- Configure target group slow start for newly healthy instances and validate cache warmup behavior.
- Disable target health checks and route production traffic to every instance immediately on launch.
Explanation
Correct Answer
C:Slow start gradually increases traffic to new eligible targets, avoiding abrupt full load before warmup.
Incorrect Answers
A:Permanent imbalance creates a single-target bottleneck rather than controlled warmup.
B:Idle timeout governs connection behavior, not the slow-start weight ramp for newly healthy targets.
D:Blind routing increases risk of sending requests to unready targets.
Question 310
An Auto Scaling group must allow a newly launched EC2 instance to register with an external license broker and download large application assets before it is considered available. Normal EC2 launch completion happens too early. Which feature permits a controlled pause in the launch lifecycle?
- Configure only EC2 user data that starts the license-registration job, without delaying the Auto Scaling instance transition to InService.
- Use an Auto Scaling lifecycle hook with a bounded heartbeat and completion action after bootstrap checks.
- Increase only the minimum number of running instances without adding any bootstrap gating.
- Set the ALB healthy threshold to one response and assume it checks the off-host license broker registration before adding an instance.
Explanation
Correct Answer
B:Lifecycle hooks pause transitions and allow initialization tasks to complete before an instance enters service.
Incorrect Answers
A:User data can run bootstrap commands but cannot by itself guarantee Auto Scaling waits for external readiness before completing launch.
C:More capacity does not prevent a newly launched but uninitialized instance from entering service.
D:An ALB health probe may help with readiness but does not establish a controlled Auto Scaling lifecycle pause and completion action for the bootstrap process.
AWS Certified Solutions Architect - Professional SAP-C02 Practice Tests