-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
I'm receiving strange error when trying to send SQS message.
Unable to parse ExceptionName: SignatureDoesNotMatch Message: Credential should be scoped to a valid region, not 'us-east-1'.
My Queue location : https://sqs.us-west-2.amazonaws.com/XXXX/YYYY
It works like a charm with a us-east location : https://sqs.us-east-1.amazonaws.com/XXXX/YYYY
`// create sqs client
Aws::Client::ClientConfiguration config;
config.scheme = Aws::Http::Scheme::HTTPS;
Aws::SQS::SQSClient sqsClient{config};
try {
// send message
Aws::SQS::Model::SendMessageRequest sendMessageRequest;
sendMessageRequest.SetQueueUrl(myQueueUrl);
sendMessageRequest.SetMessageBody("{ 'hello':'toto'}");
Aws::SQS::Model::SendMessageOutcome sendMessageOutcome = sqsClient.SendMessage(sendMessageRequest);
if(!sendMessageOutcome.IsSuccess() || sendMessageOutcome.GetResult().GetMessageId().length() == 0) {
std::cout << "AWS Error on sending SQS Message : " << sendMessageOutcome.GetError().GetMessage() << std::endl;
return 2;
}
} catch(...) {
std::cout << "Exception occurred." << std::endl;
}`
Metadata
Metadata
Assignees
Labels
No labels