trying to create a Lambda function with boto3 and increase my scaling group via lambda.
import boto3
region = 'us-east-1'
asgname = 'ASG'
autoscaling = boto3.client('autoscaling')
def lambda_handler(event, context):
autoscaling.update_auto_scaling_groups(AutoScalingGroupName=ASG, MaxSize=4)
print('Thank You')
Please change the code like below and try:
import boto3
region = 'us-east-1'
asgname = 'ASG'
autoscaling = boto3.client('autoscaling')
def lambda_handler(event, context):
autoscaling.update_auto_scaling_group(AutoScalingGroupName=asgname, MaxSize=4)
print('Thank You')
I was able to make it work successfully.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments