Skip to content

sqs.ChangeMessageVisibilityBatch fails when entries' VisibilityTimeout is zero #2250

Closed
@eraserhd

Description

Describe the bug

According to https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ChangeMessageVisibility.html , the minimum value is 0. Elsewhere, the documentation describes using zero to make the entry immediately visible. This does not work with the Go API.

Expected Behavior

A successful response.

Current Behavior

The API responds with:

{
	"Failed": [
		{
			"Message": "The request must contain the parameter ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout.",
			"Id": "93486601",
			"Code": "MissingParameter",
			"SenderFault": true
		}
	]
}

... suggesting that the API is not serializing the field because of its zero-value.

Note that the documentation does not say this is a required field, but apparently it is, so perhaps some metadata somewhere is messed up?

Reproduction Steps

Call ChangeMessageVisibilityBatch with a single entry with VisibilityTimeout of 0.

If you change VisibilityTimeout to 1, the call succeeds.

Possible Solution

Marking the field as required so it is serialized, or marking it as required to serialize?

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

	github.com/aws/aws-sdk-go-v2/config v1.17.1
	github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.18
	github.com/aws/aws-sdk-go-v2/service/sqs v1.20.8
	github.com/aws/aws-sdk-go-v2 v1.17.8 // indirect
	github.com/aws/aws-sdk-go-v2/credentials v1.12.14 // indirect
	github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 // indirect
	github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 // indirect
	github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 // indirect
	github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect
	github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 // indirect
	github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 // indirect

Compiler and Version used

Go 1.21.0

Operating System and version

Linux debian:buster

Metadata

Assignees

Labels

bugThis issue is a bug.p1This is a high priority issuequeuedThis issues is on the AWS team's backlogservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions