This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://sjoerdsmink.medium.com/saving-energy-and-money-stopping-ec2-instances-when-not-in-use-c8e44eb7f6b6 for full story | |
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
EC2InstanceId: | |
Type: 'String' | |
Description: 'EC2 Instance ID, for example i-1234567890abcdef0' | |
Resources: | |
# Optional CloudWatch alarm when CPU < 20% for 50 minutes | |
CPUAlarm: | |
Type: AWS::CloudWatch::Alarm |