SQSListener for FIFO queue with Instance profile #489
-
Hello, I'm using spring cloud version 2.3.2 I'm having issues with configuring a FIFO compatible sqs client (an AmazonSQSAsyncClient instead of AmazonSQSBufferedAsyncClient) in conjunction with using instance profile credentials.
Depending on how I tinker with the configuration sometimes i get an explicit message about failing to retrieve the token (as above) and sometimes just the regular Here's my current config:
and the relevant application.yml fragment:
Any and all help would be greatly appreciated, Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
By default, when autoconfiguration is used & instance profile is turned on in So to replicate the behavior from autoconfiguration, use this one instead of |
Beta Was this translation helpful? Give feedback.
-
Thank you, it worked! For anyone wondering what's the exact solution:
and you need to remove |
Beta Was this translation helpful? Give feedback.
By default, when autoconfiguration is used & instance profile is turned on in
application.properties
, following credentials provider is configuredEC2ContainerCredentialsProviderWrapper
(see https://github.com/awspring/spring-cloud-aws/blob/2.3.x/spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/context/ContextCredentialsAutoConfiguration.java#L104).So to replicate the behavior from autoconfiguration, use this one instead of
InstanceProfileCredentialsProvider
.