Last active
October 15, 2015 07:39
-
-
Save hassaku63/7b6b6a1a1948a2c8e49d to your computer and use it in GitHub Desktop.
This file contains 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
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