-
Notifications
You must be signed in to change notification settings - Fork 711
Description
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- I've gone though the API reference
- I've checked AWS Forums and StackOverflow for answers
- I've searched for previous similar issues and didn't find any solution
Describe the bug
Attempts to tag an SQS queue with sqs.Client.TagQueue call fails with the following error:
operation error SQS: TagQueue, https response error StatusCode: 200, RequestID: 551b5c11-ecbd-55de-8d46-046a7bfc9c2d, deserialization failed, failed to decode response body, TagQueueResult node not found
API call actually succeeds, as provided tags appear on a resource.
Version of AWS SDK for Go?
0.31.0
Version of Go (go version
)?
go version go1.16beta1 darwin/arm64
To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code or minimal repo)
go.mod contents:
module sdk-bug
go 1.16
require (
github.com/aws/aws-sdk-go-v2 v0.31.0
github.com/aws/aws-sdk-go-v2/config v0.4.0
github.com/aws/aws-sdk-go-v2/service/sqs v0.31.0
)
main.go contents:
package main
import (
"context"
"errors"
"flag"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/sqs"
)
func main() {
log.SetFlags(0)
flag.Parse()
if err := run(context.Background(), flag.Arg(0)); err != nil {
log.Fatal(err)
}
}
func run(ctx context.Context, queueURL string) error {
if queueURL == "" {
return errors.New("provide a queue url to tag")
}
log.Println("SDK version:", aws.SDKVersion)
cfg, err := config.LoadDefaultConfig(ctx)
if err != nil {
return err
}
svc := sqs.NewFromConfig(cfg)
_, err = svc.TagQueue(ctx, &sqs.TagQueueInput{
QueueUrl: &queueURL,
Tags: map[string]string{"Environment": "staging"},
})
return err
}
Build and run this program providing an SQS queue URL as a first positional argument.
Expected behavior
Program prints SDK version on stderr and finishes with 0 exit status. Resource is tagged.
Actual behavior
Program prints SDK version on stderr and finishes with non-zero exit status, printing an error:
operation error SQS: TagQueue, https response error StatusCode: 200, RequestID: 551b5c11-ecbd-55de-8d46-046a7bfc9c2d, deserialization failed, failed to decode response body, TagQueueResult node not found
Resource is tagged.
Additional context
Similar error happens with rds.Client.AddTagsToResource calls.