0
0
AWScloud~10 mins

Alarm actions (SNS, Auto Scaling) in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Alarm actions (SNS, Auto Scaling)
Metric monitored
Alarm threshold reached?
NoWait
Yes
Trigger Alarm
Send SNS notification
Subscribers notified
Trigger Auto Scaling action
Scale up/down instances
The system monitors a metric, triggers an alarm when a threshold is crossed, then sends notifications and/or scales resources automatically.
Execution Sample
AWS
Alarm:
  Metric: CPUUtilization
  Threshold: > 70%
  Actions:
    - SNS Topic
    - Auto Scaling Policy
This alarm watches CPU usage, and when it goes above 70%, it sends a message and adjusts server count.
Process Table
StepMetric ValueCondition (>70%)Alarm StateAction Taken
145%FalseOKNo action
265%FalseOKNo action
372%TrueALARMSend SNS notification, Trigger Auto Scaling
475%TrueALARMSend SNS notification, Trigger Auto Scaling
568%FalseOKNo action
💡 Metric drops below threshold at step 5, alarm state returns to OK, actions stop.
Status Tracker
VariableStartAfter 1After 2After 3After 4After 5
Metric ValueN/A45%65%72%75%68%
Alarm StateOKOKOKALARMALARMOK
Action TakenNoneNoneNoneSNS + Auto ScalingSNS + Auto ScalingNone
Key Moments - 2 Insights
Why does the alarm only trigger actions when the metric is above 70%?
Because the condition (>70%) is only true at steps 3 and 4, as shown in the execution_table rows where Alarm State changes to ALARM and actions occur.
What happens when the metric falls back below the threshold?
At step 5, the metric is 68%, condition is false, so the alarm state returns to OK and no actions are taken, as seen in the execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the Alarm State at step 2?
AOK
BALARM
CINSUFFICIENT_DATA
DUNKNOWN
💡 Hint
Check the 'Alarm State' column at step 2 in the execution_table.
At which step does the alarm first trigger Auto Scaling actions?
AStep 1
BStep 3
CStep 2
DStep 5
💡 Hint
Look at the 'Action Taken' column in the execution_table to find when Auto Scaling starts.
If the threshold was changed to > 60%, how would the alarm state at step 2 change?
AIt would become INSUFFICIENT_DATA
BIt would remain OK
CIt would change to ALARM
DIt would be UNKNOWN
💡 Hint
Step 2 metric is 65%, which is above 60%, so condition would be true.
Concept Snapshot
Alarm actions watch a metric and trigger when thresholds are crossed.
Actions include sending SNS notifications and Auto Scaling adjustments.
Alarm state changes from OK to ALARM when triggered.
Actions stop when metric returns below threshold.
Use alarms to automate responses to system changes.
Full Transcript
This visual execution shows how an alarm monitors a metric like CPU usage. When the metric goes above 70%, the alarm state changes to ALARM. This triggers two actions: sending a notification via SNS and triggering an Auto Scaling policy to adjust server count. When the metric falls back below 70%, the alarm state returns to OK and actions stop. The execution table tracks metric values, alarm state, and actions step-by-step. This helps beginners see exactly when and why actions happen in response to metric changes.