Cloudwatch Dashboard custom widget lambda - dynamic region

0

Hello, I have created a cloudwatch dashboard that custom widgets to call aws lambda. The lambda makes other AWS API calls and returns html to be displayed in the widgets.

But in case of region failover when east region lambda are in accessible, west region lambda will have to be used. Is there a way that lambda region for custom widgets can be changed dynamically, or through any dashboard input?

I would appreciate some guidance with this.

2 Answers
1

💡 You could set up an API Gateway that the dashboard interacts with via custom embedded HTML or external applications. The API Gateway would then invoke Lambda functions. This Lambda can be designed to handle region failover, and API Gateway would serve as the router.

profile picture
EXPERT
answered 2 months ago
0

Thank you, Osvaldo, for responding and sharing that it is possible to point to multiple regions lambda through the dashboard's custom widget.

But I am still don't understand how. Could you please share some reference docs for the architecture.

I am confused on:

  • The CloudWatch custom widget seems to only expect lambda Arn, how and where to specify Api gateway route endpoint?
  • And if it is possible to specify gateway routes in the custom widget, will i have to create 2 gateways, one in each region so that the other one can be used, in case one region is not reachable? If i do that, then how to dynamically change the url in the custom widget to point to different region api gateway endpoint?
  • You have mentioned

Lambda can be designed to handle region failover.

how to do that? if that lambda itself won't be accessible in case of region outage?

I apologize if my questions come across as naive or self-evident, but your guidance on this would be highly appreciated.

Neisha
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions