When using AWS CLI version aws-cli/1.15.50, Python/3.7.0, Darwin/16.7.0, botocore/1.10.49, the command
aws sqs list-queues
returns a list of the format
https://us-west-2.queue.amazonaws.com/<a number>/<queue-name>
When I call the equivalent from the Java SDK (SDK version 1.11.344 called from Scala version 2.12.6), I get a list of the format
https://sqs.us-west-2.amazonaws.com/<a number>/<queue-name>
PLEASE NOTE: the number is the same in both URLs as are the corresponding queue names.
The differences are:
- The CLI begins with the region (
us-west-2) while the SDK begins withsqs. - After the region, the CLI's domain name is
.queue.amazonaws.combut the JDK has just.amazonaws.com. (The SDK does not have the tokenqueue..)
I get the same results when using get-queue-url and getQueueUrl (either overload in the SDK).
Messages sent using aws sqs send-message with the URL returned by the CLI are not received by the Scala program using the URL returned by the AWS Java SDK.
What am I doing wrong?
CLIandJava SDK, do they both show up in the same queue? - Asdfgaws sqs send-message, can you see the message in the SQS management console? If so, then the problem lies with message retrieval. - John Rotenstein