From 5d16a041b6b27b4abd99501c769452005a11c724 Mon Sep 17 00:00:00 2001 From: Yevgeniy Brikman Date: Fri, 22 Apr 2016 02:05:09 +0200 Subject: [PATCH] Fix tag name in GetEc2InstanceIdsByTag function --- aws/ec2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/ec2.go b/aws/ec2.go index 438a743c8..50496d88b 100644 --- a/aws/ec2.go +++ b/aws/ec2.go @@ -13,7 +13,7 @@ func GetEc2InstanceIdsByTag(awsRegion string, tagName string, tagValue string) ( svc := ec2.New(session.New(), aws.NewConfig().WithRegion(awsRegion)) tagFilter := &ec2.Filter{ - Name: aws.String(fmt.Sprintf("tag:key=%s", tagName)), + Name: aws.String(fmt.Sprintf("tag:%s", tagName)), Values: []*string{aws.String(tagValue)}, } output, err := svc.DescribeInstances(&ec2.DescribeInstancesInput{Filters: []*ec2.Filter{tagFilter}})