nurav
nurav

Reputation: 289

S3 Notifications invoke sqs topic in other region

I have a bucket which I have configured SQS in US-EAST-1 and S3 Bucket in US West Carlifornia region , Is there any way that I can configure the SQS from other region to be invoked at the time of an s3 event

Able to setup event notification when

S3 - Same region - Same account SQS - Same region - Same account

S3 - Same Region - Different account SQS - Same Region - in another account

NOT WORKING

S3 - Different region SQS - Different region

can someone help me, please?

Upvotes: 3

Views: 4609

Answers (4)

Hải Trần
Hải Trần

Reputation: 1

It's supported now: s3, sns in the same region, sqs another region.

Upvotes: 0

Sebastian Blask
Sebastian Blask

Reputation: 2938

You can now send S3 notifications to EventBridge, from there send them to EventBridge in another region and from there forward them to SQS.

Upvotes: 1

Michael - sqlbot
Michael - sqlbot

Reputation: 178956

The Amazon SQS queue must be in the same region as your Amazon S3 bucket.

https://docs.aws.amazon.com/AmazonS3/latest/user-guide/setup-event-notification-destination.html

It isn't a supported configuration for S3 to reach across a regional boundary to send a notification to SQS. The reason why is not specifically stated in the documentation.

But there is a workaround.

An S3 bucket in us-west-1 can send an event notification to an SNS topic in us-west-1, and and an SQS queue in us-east-1 can subscribe to an SNS topic in us-west-1... so S3 (us-west-1) → SNS (us-west-1) → SQS (us-east-1) is the solution, here. After subscribing the queue to the topic, you may want to enable the "raw message delivery" option on the subscription, otherwise the message format will differ from what you expect, because otherwise SNS will add an outer wrapper to the original event notification payload.

Upvotes: 6

John Rotenstein
John Rotenstein

Reputation: 269081

Cross-region Amazon S3 events do not work for Amazon SNS, so they probably won't work for Amazon SQS either. See: S3 Notifications invoke sns topic in other region

Some options:

  • Trigger an AWS Lambda function that pushes a message into the SQS queue in the other region, or
  • Use cross-region replication to replicate the bucket to the other region and trigger an event from there

Upvotes: 0

Related Questions