Cloudwatch Dashboard custom widget lambda - dynamic region


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.

feita há 3 meses183 visualizações
3 Respostas

💡 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
respondido há 3 meses

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.

respondido há 3 meses

I was able to use the Dashboard variables to change the Lambda arn on user input.

respondido há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas