SAP-C03 · Domain 5: Operational Excellence and Automation · 20% of the exam
Task 5.4: Design operational automation and resilient systems.
Operations that run themselves safely: health monitoring and quota planning, remediation with circuit breakers, rate limits and backoff, metric and scheduled scaling, automatic replacement of failed parts, and runbooks for routine and incident tasks.
Study it
Health monitoring, quotas, scaling policies and automatic recovery
Try each one before opening the answer. Every option is explained, with the AWS documentation page that proves it.
Question 1 · choose 1
A new ECS service behind an Application Load Balancer handles requests whose cost is roughly the same. The team wants the number of tasks to follow traffic automatically and keep a steady number of requests per task. Which scaling setup fits?
ATarget tracking on ALBRequestCountPerTarget for the service
BA daily scheduled scale-out at 9:00
CA fixed desired count set for the busiest hour of the week
DScaling on the memory use of the cluster's EC2 instances
Show the answer and why
ATarget tracking on ALBRequestCountPerTarget for the service
Correct
Service Auto Scaling target tracking can use the ALBRequestCountPerTarget metric to keep requests per task near a target.
BA daily scheduled scale-out at 9:00
Incorrect
Schedules do not follow actual traffic.
CA fixed desired count set for the busiest hour of the week
Incorrect
A fixed count wastes capacity off-peak and cannot follow changes.
DScaling on the memory use of the cluster's EC2 instances
Incorrect
Instance memory does not track requests per task.
Request-driven ECS scaling uses target tracking on requests per target.
An operations team is paged several times a week because the data volume of a log-heavy application fills up on one of 300 Amazon EC2 instances. The fix is always the same: compress old logs and move them to Amazon S3. The team wants this handled automatically, with each run recorded, and without giving anyone SSH access. Which solution meets these requirements?
AWrite a Lambda function that opens SSH sessions to each instance every hour and runs the clean-up commands
BAdd the AWS Trusted Advisor checks to the weekly operations review and clean up the instances that it lists
CAlarm on agent disk metrics and let EventBridge start a Systems Manager Automation runbook for the instance
DReplace the instances with larger instance types that have twice the disk space for the application logs
Show the answer and why
AWrite a Lambda function that opens SSH sessions to each instance every hour and runs the clean-up commands
Incorrect
This relies on SSH access and keys, which the team wants to avoid, and it runs on every instance instead of the ones that need it.
BAdd the AWS Trusted Advisor checks to the weekly operations review and clean up the instances that it lists
Incorrect
Trusted Advisor checks do not watch disk usage inside instances, and a weekly review is not automatic remediation.
CAlarm on agent disk metrics and let EventBridge start a Systems Manager Automation runbook for the instance
Correct
The CloudWatch agent publishes disk use from inside the instance, alarm state changes reach EventBridge, and a rule can start an Automation runbook whose executions are recorded and need no SSH access.
DReplace the instances with larger instance types that have twice the disk space for the application logs
Incorrect
More disk only delays the problem and raises cost; the volume would fill up again later.
A repeated manual fix is a candidate for automation: a metric from the agent, an alarm, and an Automation runbook started by EventBridge.
EC2 instances in an Auto Scaling group sit behind an Application Load Balancer. Sometimes the application process hangs: the load balancer marks the target unhealthy and stops sending it traffic, but the instance keeps running for days until someone replaces it, and the group runs short of capacity. Which change makes the system heal itself?
ATurn on instance scale-in protection so that the group keeps its instances
BAdd a CloudWatch alarm on the CPUUtilization metric that notifies the team
CIncrease the desired capacity by one so that there is always a spare instance
DTurn on Elastic Load Balancing health checks for the Auto Scaling group
Show the answer and why
ATurn on instance scale-in protection so that the group keeps its instances
Incorrect
Scale-in protection stops the group from terminating instances during scale-in, which keeps the hung instance even longer.
BAdd a CloudWatch alarm on the CPUUtilization metric that notifies the team
Incorrect
A notification still needs a person to act, and a hung process does not reliably show up in CPU use.
CIncrease the desired capacity by one so that there is always a spare instance
Incorrect
A spare instance hides the lost capacity but leaves unhealthy instances running and paid for.
DTurn on Elastic Load Balancing health checks for the Auto Scaling group
Correct
With ELB health checks turned on, Auto Scaling also uses the load balancer's health check results and replaces instances that fail them.
By default, Auto Scaling looks only at EC2 status checks; adding the load balancer's health checks lets it replace instances whose application failed.
Driver updates and software installs on 600 managed instances must only run during an approved weekly window on Sunday nights, and they currently run whenever an engineer starts them. Which Systems Manager capability enforces the schedule?
ASession Manager sessions opened on Sundays
BMaintenance Windows with the update tasks registered
CParameter Store parameters that hold the schedule for each update
DInventory collection every Sunday
Show the answer and why
ASession Manager sessions opened on Sundays
Incorrect
Interactive sessions still depend on engineers acting by hand.
BMaintenance Windows with the update tasks registered
Correct
Maintenance Windows define a schedule for potentially disruptive actions such as updating drivers or installing software.
CParameter Store parameters that hold the schedule for each update
Incorrect
Parameters store values; they do not run tasks on a schedule.
DInventory collection every Sunday
Incorrect
Inventory gathers data about instances; it does not install software.
Disruptive changes on a schedule belong in a maintenance window.
A nightly batch job runs on 200 container workers that write to one provisioned DynamoDB table through an AWS SDK. The launch script of each worker exports AWS_MAX_ATTEMPTS=1, so short bursts of throttling fail items. In a test with a fixed one-second delay between retries, the workers retried in lockstep and were throttled again. The team must ride out brief throttling without failing items, avoid synchronized retries, keep the table's capacity mode and cost unchanged, add no new infrastructure, and change only configuration, not code. Which solution meets these requirements?
AKeep the one-second retries but give each worker a different fixed delay derived from its worker number
BSwitch the table to on-demand capacity mode so that DynamoDB absorbs the bursts without throttling the workers
CSend the writes to an SQS queue and have a separate consumer write them to the table at a controlled rate
DRemove the launch script's override and set the SDK's retry mode to standard with a higher max attempts value
Show the answer and why
AKeep the one-second retries but give each worker a different fixed delay derived from its worker number
Incorrect
Different fixed delays would spread the first retry, but the delays never grow while throttling lasts, and computing them per worker is a code change. The SDK's standard mode already backs off with jitter.
BSwitch the table to on-demand capacity mode so that DynamoDB absorbs the bursts without throttling the workers
Incorrect
On-demand mode handles throughput management and scaling for you, which can remove the throttling, but it changes the table's capacity mode and how it is billed, which the team must keep as they are.
CSend the writes to an SQS queue and have a separate consumer write them to the table at a controlled rate
Incorrect
A queue buffers requests and decouples the workers from the table, which smooths bursts, but it is new infrastructure and new code, both ruled out.
DRemove the launch script's override and set the SDK's retry mode to standard with a higher max attempts value
Correct
Standard mode retries failed requests with exponential backoff and jitter, using longer delays for throttling errors, so workers stop retrying in lockstep. Retry mode and max attempts can be set through environment variables or the shared config file, without code changes.
The constraints are no failed items, no synchronized retries, unchanged table capacity, no new infrastructure and configuration-only changes. On-demand mode changes billing, a queue adds infrastructure, and staggered fixed delays need code and never back off. The SDK's standard retry mode, set through configuration, adds exponential backoff with jitter.
A Lambda function reads a Kinesis data stream. One malformed record makes the whole batch fail again and again, and the shard stops making progress. Which configuration helps isolate the bad record?
AIncrease the batch size
BIncrease the number of shards
CTurn on BisectBatchOnFunctionError
DLower the stream's retention period
Show the answer and why
AIncrease the batch size
Incorrect
Larger batches still fail as a whole.
BIncrease the number of shards
Incorrect
More shards do not remove the bad record from its batch.
CTurn on BisectBatchOnFunctionError
Correct
When an invocation fails and bisecting is on, the batch is split so the failing record can be isolated.
DLower the stream's retention period
Incorrect
Retention controls how long records stay, not how failures are handled.
Splitting failed Kinesis batches isolates poison records.
A fleet of queue-processing workers runs as an Amazon ECS service on AWS Fargate without a load balancer. Sometimes a worker's processing thread hangs: the container keeps running, so ECS never replaces the task, and throughput drops until someone stops the task by hand. The application exposes a local endpoint that reports whether its thread is alive. The team wants hung tasks replaced automatically. Which change meets this requirement?
AAdd a container health check to the task definition that calls the local endpoint, and let ECS replace UNHEALTHY tasks
BPut an internal Application Load Balancer in front of the workers and rely on its target group health checks to replace hung tasks
CAdd a HEALTHCHECK instruction to the container image and rely on ECS to read it
DSet the service's minimum healthy percent to 100 so that ECS keeps every task running
Show the answer and why
AAdd a container health check to the task definition that calls the local endpoint, and let ECS replace UNHEALTHY tasks
Correct
ECS runs the health check command inside the container and treats the task as unhealthy when it fails, so the service scheduler replaces the hung task.
BPut an internal Application Load Balancer in front of the workers and rely on its target group health checks to replace hung tasks
Incorrect
The workers accept no inbound requests, so adding a load balancer only to get health checks adds cost and components without matching how the service works.
CAdd a HEALTHCHECK instruction to the container image and rely on ECS to read it
Incorrect
ECS monitors only health checks specified in the container definition; it does not monitor a Docker health check that exists only in the image.
DSet the service's minimum healthy percent to 100 so that ECS keeps every task running
Incorrect
Minimum healthy percent controls how many tasks stay running during a deployment; it does not detect a task whose application has hung.
For tasks without a load balancer, a container health check in the task definition is how ECS learns that an application is unhealthy and replaces the task automatically.
A platform team has twice hit a regional service quota during a busy launch, which blocked new EC2 instances and Lambda capacity for hours while an increase was processed. The team wants to know days in advance when usage of its most important quotas approaches the limit, so that it can request increases in time, using managed features rather than custom scripts. Which approach meets these requirements?
ARead the quota values in the Service Quotas console every Monday and compare them with the planned launches
BCreate CloudWatch alarms from Service Quotas on the key quotas at 80% utilization for the on-call team
CCreate an AWS Budgets usage budget for EC2 instance hours with an alert at 80% of the budgeted amount
DAlarm on Lambda Throttles and EC2 InsufficientInstanceCapacity errors in each account
Show the answer and why
ARead the quota values in the Service Quotas console every Monday and compare them with the planned launches
Incorrect
A weekly manual check is neither automatic nor based on actual usage approaching the limit.
BCreate CloudWatch alarms from Service Quotas on the key quotas at 80% utilization for the on-call team
Correct
For quotas that support it, Service Quotas creates CloudWatch alarms on usage relative to the quota, so the team is warned before usage reaches the limit.
CCreate an AWS Budgets usage budget for EC2 instance hours with an alert at 80% of the budgeted amount
Incorrect
A usage budget compares usage with an amount that the team chooses, not with the applied service quota, so it does not warn before a quota is reached.
DAlarm on Lambda Throttles and EC2 InsufficientInstanceCapacity errors in each account
Incorrect
These signals appear only after the limit is reached, which is too late to request an increase in time.
Capacity planning for quotas is easiest with CloudWatch alarms created from Service Quotas, which compare usage with the applied quota and warn at a chosen threshold.