Can an AWS CloudWatch event in region us-east-1
trigger a lambda in us-west-2
? Or do I have to deploy my lambda in both regions?
Rules in CloudWatch Events work only in the Region in which they are created. If you configure CloudTrail to track API calls in multiple Regions, and you want a rule based on CloudTrail to trigger in each of those Regions, you must create a separate rule in each Region that you want to track.
Can I use lambda across regions? AWS Lambda is a regional service. A single Lambda function in a single region can make API calls to AWS services in other regions, but they're remote, of course, so any data transferred between that Lambda function and the destination services or vice-versa takes longer and costs more.
With EventBridge (CloudWatch Events), you can create rules that match selected events in the stream and route them to your AWS Lambda function to take action. For example, you can automatically invoke an AWS Lambda function to log the state of an EC2 instance or AutoScaling group.
Sending Amazon SNS messages to an Amazon SQS queue or AWS Lambda function in a different Region. Amazon SNS supports cross-region deliveries, both for Regions that are enabled by default and for opt-in Regions.
An alternative is to have CloudWatch trigger SNS. As per the attached screenshot, SNS topic subscription will allow full ARN declaration, and the dropdown even showed a us-east-1 lambda when I was in US West (Oregon) region.
SNS Screenshot
From the dashboard, it is not possible to trigger cross region Lambda. When you create a CloudWatch event rule, select a Target
to invoke, under Lambda function only the lambdas in the current region are shown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With