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
posta un anno fa264 visualizzazioni
2 Risposte
0
Risposta accettata

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

perpil
con risposta un anno fa
profile picture
ESPERTO
verificato 2 mesi fa
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
ESPERTO
con risposta un anno fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande