Description:
Amazon Lightsail offers instances that provide a baseline amount of CPU performance, but also have the ability to temporarily provide additional CPU performance above the baseline as needed. This is referred to as bursting.
Rational:
You can configure Lightsail to notify you when a metric for one of your instances CPU utilization crosses a specified threshold. Notifications can be in the form of a banner displayed in the Lightsail console, an email sent to an address you specify or an SMS text message sent to a mobile phone number you specify.
Impact:
If the alarm threshold is breached you will receive a notification in the Lightsail console, and, optionally, you can choose to receive an email message and/or SMS message.
Default Value:
By default, lightsail will not set any alarm.
Audit:
Sign in to AWS Management console
Go to the Lightsail service at https://lightsail.aws.amazon.com/
Choose and click on the instance you want to examine
Go to the Metrics tab and select CPU utilization in the drop-down menu
In the bottom check whether is there any alarm configured or not
Remediation:
Pre-requisites:
Sign in as admin or IAM user with required permissions
Implementation steps:
Sign in to AWS Management console
Go to the Lightsail service at https://lightsail.aws.amazon.com/
Choose and click on the instance you want to set the alarm
Go to the Metrics tab and select CPU utilization in the drop-down menu
Click on the CPU utilization
Click on Add Alarm at the bottom
Set the mathematical expression and threshold along with the monitoring frequency as per your requirement
Choose the notifying option from the list of options available
Click on create
Via CLI:
put-alarm
--alarm-name <value>
--metric-name <value>
--monitored-resource-name <value>
--comparison-operator <value>
--threshold <value>
--evaluation-periods <value>
[--datapoints-to-alarm <value>]
[--treat-missing-data <value>]
[--contact-protocols <value>]
[--notification-triggers <value>
Backout plan:
Sign in to AWS Management console
Go to the Lightsail service at https://lightsail.aws.amazon.com/
Choose and click on the instance you want to disable the alarm
Go to the Metrics tab and select CPU utilization in the drop-down menu
At bottom Click on toggle button to disable the alarm or click on the side menu and select Delete Alarm to delete the alarm
Reference:
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-notifications