Details
Description
Diagnosis
When configuring the component with a queue ARN, for example:
aws-sqs://arn:aws:sqs:eu-west-1:account-number:queue-name
The region is being parsed as EU_WEST_1. See https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java#L64
The region is then used in the construction of the queue URL in https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java#L132
This creates a URL pointing to the wrong host: https://sqs.EU_WEST_1.amazonaws.com/account-number/queue-name when the right one should be https://sqs.eu-west-1.amazonaws.com/account-number/queue-name
Subsequents polls of the sqs component failed due to to this host not being recognised:
java.net.UnknownHostException: sqs.EU_WEST_1.amazonaws.com
Proposed solution
Invoke the getName method instead of toString the https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java#L64