I have an SQS queue configured in AWS. I can send and receive messages using the AWS CLI and my IAM credentials that I set.
What I would like to do is use the queued messages with Camel configured with Spring. I tried this example because it is very clear and precise:
https://github.com/christian-posta/camel-sqs-example
However, I get the following exception:
com.amazonaws.AmazonServiceException: Status Code: 403, AWS Service: AmazonSQS, AWS Request ID: 115057f8-3c4f-5ec6-8fe9-18ea097b2730, AWS Error Code: InvalidClientTokenId, AWS Error Message: The security token included in the request is invalid.
Amazon provides the most useless documentation:
InvalidClientTokenId
An X.509 certificate or AWS passkey identifier does not exist in our records.
HTTP Status Code: 403
I double-checked that I use the same IAM credentials as in the CLI, and that the IAM user has a policy that allows read and write access to the queue. I also played around sending additional URLs for accessKey, secretKey, amazonSQSEndpoint and the region as a documented Camel .
Why does Amazon say that the passkey is invalid or does not exist in their records and how can I fix my request?
source share