Skip to content

Instantly share code, notes, and snippets.

@hassaku63
Last active October 15, 2015 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassaku63/7b6b6a1a1948a2c8e49d to your computer and use it in GitHub Desktop.
Save hassaku63/7b6b6a1a1948a2c8e49d to your computer and use it in GitHub Desktop.
import boto3
autoscaling = boto3.client("autoscaling")
#org_param = dict(MinSize=2, DesiredCapacity=2) # 復元先のパラメータ
stop_param = dict(MinSize=0, DesiredCapacity=0) # 擬似Stopする時のパラメータ
def lambda_handler(event, context):
"""
cron triggered function
"""
autoscaling.update_auto_scaling_group(AutoScalingGroupName="test-asg", **stop_param)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment