URL contents on custom widget in Cloudwatch.

0

Any documentation that describes how to display url contents on the custom widget on cloud watch? In cloudwatch there are many options in custom widget that includes javascript and pyhton.

2 Answers
0

The documentaion about the custom widget can be found here, the the steps to create a custom widget can be found here.

A custom widget is a CloudWatch dashboard widget that can call any AWS Lambda function with custom parameters. It then displays the returned HTML or JSON.

Strictly speaking, you need to create a Lambda Function that returns the HTML or JSON result that meets your needs (in your case, the function that fetches the content from a website) from scratch, and that is what the "custom" means.

there are many options in custom widget that includes javascript and pyhton.

These options are merely bootstrap templates for general and frequent purposes that might make you easier to get start, but these options are not the ones that exactly fulfill your requirements. You need to modify the bootstrap function as needed.

Personally, I would prefer to create a Lambda from scratch and just use the templates as a hint to develop my custom function.

profile picture
HS
answered 7 months ago
  • Lambda funtion is returning only html code, will it return webpage ?

  • What does the "webpage" mean if it is not a HTML or JSON document (or possibly XML or others). Did you expect CloudWatch widget to serve you a fully featured cloned website? The documentation states the widget "displays the returned HTML or JSON" and NO JavaScript as mentioned in the previous question, so that's all for the custom widget.

0
profile picture
EXPERT
Kallu
answered 7 months ago
  • Problem is that in displaying url on custom widget , by clicking on that option it opens cloudfront

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