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:

  1. Sign in to AWS Management console

  2. Go to the Lightsail service at https://lightsail.aws.amazon.com/

  3. Choose and click on the instance you want to examine

  4. Go to the Metrics tab and select CPU utilization in the drop-down menu

  5. 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:

  1. Sign in to AWS Management console

  2. Go to the Lightsail service at https://lightsail.aws.amazon.com/

  3. Choose and click on the instance you want to set the alarm

  4. Go to the Metrics tab and select CPU utilization in the drop-down menu

  5. Click on the CPU utilization

  6. Click on Add Alarm at the bottom

  7. Set the mathematical expression and threshold along with the monitoring frequency as per your requirement

  8. Choose the notifying option from the list of options available

  9. 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:
  1. Sign in to AWS Management console

  2. Go to the Lightsail service at https://lightsail.aws.amazon.com/

  3. Choose and click on the instance you want to disable the alarm

  4. Go to the Metrics tab and select CPU utilization in the drop-down menu

  5. 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