If you’ve ever tried to use an SQS queue in another region as the destination for S3 events, you must have seen this error:
The notification destination service region is not valid for the bucket location constraint.
What that cryptic error message essentially means is that the S3 bucket & the event destination must be in the same region. But what if you need to deliver your S3 events to an SQS queue to another region? Well, you can do it as shown below:
Assuming you already have the S3 bucket & the SQS queue, create an SNS topic in the same region as the bucket & set it as the destination for your S3 events:
Then in the SQS console, open your queue & subscribe it to the SNS topic:
Or you can subscribe the queue to the topic from the SNS console as well:
Once that’s done, drop a file in the bucket & poll the queue for messages to see your S3 event:
A similar strategy can be used to deliver S3 events across regions to SNS topics or Lambda functions.