Skip to content

Instantly share code, notes, and snippets.

@jsbonso
Last active February 11, 2024 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jsbonso/cd5d582265a42059009eacd1313a6a96 to your computer and use it in GitHub Desktop.
Save jsbonso/cd5d582265a42059009eacd1313a6a96 to your computer and use it in GitHub Desktop.
Dynamic Start and Stop Scheduler Functions
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "Dynamic Start and Stop Scheduler Functions - Tutorials Dojo",
"Action": [
"autoscaling:EnterStandby",
"autoscaling:ExitStandby",
"autoscaling:PutScalingPolicy",
"autoscaling:SetDesiredCapacity"
],
"Resource": [
"arn:aws:autoscaling:*:*:autoScalingGroup:*:autoScalingGroupName/test-asg"
],
"Effect": "Allow"
},
{
"Action": [
"autoscaling:DescribeAutoScalingInstances",
"ec2:StopInstances",
"ec2:StartInstances",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"ssm:GetParameter"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment