Configure consumer to use a SQS client that gets credentials using sts.assumeRole and post refresh #374
-
Describe the bugCreated a node service application that is responsible to send messages to a SQS queue. The reason the processing is not done as part of the main API and offloaded to the sqs consumer ( that runs in a separate container ) is to unblock the API and run the processing in the background which will be responsible to call 3rd party API's and transform data and store the transformed data in the DB. In order to do so I have to call the
One way to stop seeing this error is to restart the pod which is not really ideal. What would be the best way to refresh the credentials and pass it to the sqs client so that we don't run into the above error.
Trying to figure out the cleanest way to keep the application processing the messages without running into the invalid credentials error. Is stopping and restarting the container once the credentials expire the best way to go or are they any other solutions ? Any pointers on this regard would be great. Your minimal, reproducible examplenone Steps to reproduceNone Expected behaviorI expect the sqs consumer to process the messages with out any invalid credentials error. How often does this bug happen?Every time Screenshots or VideosNo response PlatformmacOS Package versionv5.8.0 AWS SDK versionv2.1178.0 Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Hey, I've converted this to a discussion as I'm not sure that there's any particular SQS Consumer. Happy to discuss options here and raise an issue if we come to that. I'll have a look through what you wrote and I'll get back with more if I have more to expand on this. |
Beta Was this translation helpful? Give feedback.
-
Tried to use the SQS from AWS sdk v3 and the latest
Wondering if you have ever run into such an error ? |
Beta Was this translation helpful? Give feedback.
Tried to use the SQS from AWS sdk v3 and the latest
sqs-consumer
package and I started seeing this error now with the exact same piece of code.Wondering if you have ever run into such an error ?