Regression in Cloudwatch Dashboard? iframe embed stopped working

0

Up until recently, I was able to embed a public cloudwatch dashboard into a webpage using an iframe. Recently it started throwing javascript errors in the browser console. Tested in both FF and Chrome 111. A minimal repro is the following html file. Replace the <public dashboard url> with a valid cloudwatch public dashboard url. Mine is in us-west-2

<html>
<head><title>Dashboard test</title></head>
<body>
 <iframe src="<public dashboard url>" title="Dashboard"></iframe>
</body>
</html>

If I hit the public dashboard url directly it loads. In a iframe, it gets credentials but then there are JS errors and it errors out. See screenshot:

Enter image description here

perpil
asked a year ago254 views
2 Answers
0
Accepted Answer

AWS reached out to me directly and made an update so dashboards once again work in iframes.

perpil
answered a year ago
profile picture
EXPERT
reviewed a month ago
0

Usually CloudWatch Dashboards need AWS access (IAM user or role) however as you are embedding this I am assuming these dashboards would have been made publicly shared without AWS access. Check if the settings have been changed. https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-dashboard-sharing.html

AWS
EXPERT
answered a year ago
  • No settings were changed and the public url loads if you hit it directly in the browser. There is an IAM role, access is provided via Cognito. You only get the cross-origin error in an iframe. Note the repro is a local html file that to my knowledge should not be impacted by CORS issues like a html file hosted on a domain would.

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