- Install
- Create a role and add CloudwatchFullAccess to it
- Assign to the EC2 Instance
- Edit configs and add the template above
- Change Namespace
- Pull configs
- Start
- See status
- Create Alarm (For CPU Just create a expression (1-cpu_idle) as cpu_util)
- Attach action
- Give neccesary permissions
Principal: lambda.alarms.cloudwatch.amazonaws.com
Permission: lambda:InvokeFuncion
ARN: The alarm ARN