Cross-regional event driven architecture

0

We use EventBridge to trigger a number of applications. The event rule's pattern is always time-based or S3-based. The setup looks like this:

               Pattern                     Target
               -------                     ------
Event Rule 1   9pm daily                   ECS Cluster 1
Event Rule 2   File dropped to S3 bucket   ECS Cluster 2

The event rules and targets all live in the same AWS region. How can I make this cross-regional? The events should be produced and processed if one region is unavailable. Events can be produced in one region and consumed in another. The ECS clusters are already available in both Primary and Secondary regions.

2 個答案
1

Hi,

You can have an introductory read on this: https://aws.amazon.com/blogs/compute/introducing-cross-region-event-routing-with-amazon-eventbridge/

It provides some good practices and limitations on the approach.

Hope it helps ;)

profile picture
專家
已回答 1 年前
  • Yes, I did read that guide. The event producers reside in a single region, which is problematic for our DR plan. If we lose that region, there will be no event for the consumers to process.

1

Duplicate Your Event Sources & Targets in the Secondary Region It appears that your event sources (daily 9pm trigger and file drop to S3 bucket) and targets (ECS Clusters) are already in both regions. If not, you'll need to duplicate your setup in the secondary region.

Cross-Region EventBridge Setup AWS EventBridge does not support cross-region event delivery natively. However, you can work around this by leveraging SNS, SQS, or Lambda. Here's an example with SNS:

Create an SNS Topic in your secondary region. Create an EventBridge rule in your primary region that targets the SNS Topic in the secondary region. Create an EventBridge rule in the secondary region that triggers based on messages published to the SNS Topic. This setup allows events triggered in your primary region to be sent to your secondary region.

Consider Implementing Cross-Region Replication for S3 If you want to make sure the S3 bucket event is also triggered in the secondary region if the primary region is down, consider implementing cross-region replication (CRR) for your S3 buckets. CRR automatically copies new objects across buckets in different AWS regions.

Implement Failover Strategy In case of failure in the primary region, you'll want a mechanism to failover to the secondary region. You can do this with Route53's DNS failover feature. You can set up health checks and if a check fails, Route53 can reroute traffic to your resources in your secondary region.

profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南