Open
Description
Pre-Migration Checklist
- I've read the Migration Guide.
- I've checked AWS Forums and StackOverflow for similar migration issues.
Go Version Used
Go 1.21
Describe the Migration Issue
Back in v1 I was able to obtain presign URL for SQS service ReceiveMessage
operation, by calling ReceiveMessageRequest
.
I couldn't find a way to do it SDK v2, the only way is to call ReceiveMessage
and get the messages directly.
Code Comparison
In V1:
func (s *Service) getSignedRequestsURL(queueURL string, maxNumOfMessages, visibilityTimeout, waitTimeSeconds int64) (string, error) {
req, _ := s.sqsService.ReceiveMessageRequest(&sqs.ReceiveMessageInput{
QueueUrl: aws.String(queueURL),
MaxNumberOfMessages: aws.Int64(maxNumOfMessages),
VisibilityTimeout: aws.Int64(visibilityTimeout),
WaitTimeSeconds: aws.Int64(waitTimeSeconds),
})
exp := 20 * time.Minute
signedURL, err := req.Presign(exp)
if err != nil {
return "", err
}
return signedURL, nil
}
Observed Differences/Errors
Similar functionality not exist in V2.
Additional Context
No response