'UpdateAutoScalingGroup permission error with boto3
i am getting error while running this script :
def set_asg_launch_template_version_latest(asg_name, lt_id):
try:
response = client.update_auto_scaling_group(
AutoScalingGroupName=asg_name,
LaunchTemplate={
'LaunchTemplateId': lt_id,
'Version': '$Latest'
}
)
print("Set launch template: {} version for asg: {} to $Latest".format(lt_id, asg_name))
return response
except ClientError as e:
print('Error setting launch template version to $Latest')
raise e
set_asg_launch_template_version_latest(ASGName,launch_template_id )
============> ClientError - An error occurred (AccessDenied) when calling the UpdateAutoScalingGroup operation: You are not authorized to use launch template: lt-xxxxxxxxx
hint : all these permissions are authorized (check last one):
- resource-groups:ListGroupResources
- tag:GetResources
- s3:PutObject
- s3:PutObjectAcl
- s3:List*
- ec2:Describe*
- ec2:CreateSnapshot
- ec2:CreateImage
- kms:CreateGrant
- ec2:StartInstances
- ec2:RunInstances
- ec2:TerminateInstances
- autoscaling:StartInstanceRefresh
- ec2:CreateSecurityGroup
- ec2:AuthorizeSecurityGroupEgress
- ec2:DeleteSecurityGroup
- ec2:RevokeSecurityGroupEgress
- ec2:ModifyLaunchTemplate
- ec2:CreateLaunchTemplateVersion
- autoscaling:Describe*
- ec2:DescribeLaunchTemplateVersions
- ec2:DescribeLaunchTemplates
- autoscaling:UpdateAutoScalingGroup
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
