Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a CloudWatch Event in one region trigger a Lambda in another region of AWS?

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?

like image 533
Subtubes Avatar asked Jun 27 '17 18:06

Subtubes


People also ask

Are CloudWatch events region specific?

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 lambda work across regions?

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.

Can CloudWatch events trigger lambda?

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.

Can SNS trigger lambda in different region?

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.


2 Answers

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

like image 84
Chris White Avatar answered Oct 16 '22 09:10

Chris White


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.

enter image description here

like image 28
helloV Avatar answered Oct 16 '22 11:10

helloV