Closed mpechner-akasa closed 1 year ago
Hi Michael, thanks for opening this issue. However I believe this code is correct. This code is using the 'tag-key' search where we are only verifying that that Create_Auto_Alarms. tag is present and the value isn't important. In order to activate the solution, you only need to have this tag key present. You can change the default activation tag key by setting the ALARM_TAG environment variable.
Per boto3 documentation for describe_instances:
tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
yes, sorry about that. Closed my PR
You are missing the "tag:" as part of the filer name. instance = ec2_client.describe_instances( Filters=[ { 'Name': 'tag:tag-key', 'Values': [ tag_key ] } ], InstanceIds=[ instance_id ]