You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even after adding IAM permission for:
Action('autoscaling', 'DescribeAutoScalingInstances'),
My "group" was coming back blank and was not submitting a metric for the ASG, only for the instance. In another part of my project, I got the ASG name of of the instance tags. I've re-written your _get_auto_scaling_group_name() method using the code from our project and now it's working.
Thanks!!
def _get_auto_scaling_group_name(self, instance_id, region):
conn = boto.ec2.connect_to_region(region)
# figure out tags for current instance and pick out the ASG name
self_filters = {
'resource-type': 'instance',
'resource-id': instance_id}
tags = conn.get_all_tags(filters=self_filters)
asg_tags = [
tag
for tag in tags if tag.name == u'aws:autoscaling:groupName']
asg_name = None
# if ASG tag found, return it
if len(asg_tags) == 1:
asg_name = asg_tags[0].value
print "AsgFound: "+asg_name
return asg_name
The text was updated successfully, but these errors were encountered:
Even after adding IAM permission for:
Action('autoscaling', 'DescribeAutoScalingInstances'),
My "group" was coming back blank and was not submitting a metric for the ASG, only for the instance. In another part of my project, I got the ASG name of of the instance tags. I've re-written your _get_auto_scaling_group_name() method using the code from our project and now it's working.
Thanks!!
The text was updated successfully, but these errors were encountered: