You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now when using the new SDK v2, I need to use the SQS client which only have option to call directley to ReceiveMessage method.
After some digging, I figure out I probably need to use the finalize step in smithyHTTP middleware: https://aws.github.io/aws-sdk-go-v2/docs/making-requests/
However, I coudln't make it work. I saw there is an helper function NewPresignHTTPRequestMiddleware in "github.com/aws/aws-sdk-go-v2/aws/signer/v4" that looks like doing what I need, so I tried:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Back in v1 SDK, we could use this to generate presgiend URL for ReceiveMessage:
Now when using the new SDK v2, I need to use the SQS client which only have option to call directley to
ReceiveMessage
method.After some digging, I figure out I probably need to use the finalize step in smithyHTTP middleware: https://aws.github.io/aws-sdk-go-v2/docs/making-requests/
However, I coudln't make it work. I saw there is an helper function
NewPresignHTTPRequestMiddleware
in"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
that looks like doing what I need, so I tried:Which ofc dones't work:
"message checksum validation failed, wrong output type, expect *sqs.ReceiveMessageOutput, got *v4.PresignedHTTPRequest"
What's the idomatic way to migrate the
req.Presign(exp)
loginc in v2 sdk?Can't find any docs or examples.
Beta Was this translation helpful? Give feedback.
All reactions