By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Not able to display iFrame using Opensearch Serverless Dashboard

0

Good morning/afternoon/evening,

I'm facing an issue trying to embed some visualizations as iFrames in my app. The iFrames are configured in a Dashboard which have an Opensearch Serverless Collection behind it (it's the standard AOSS with a Dashboard configuration, nothing strange here)

I'm using IAM credentials which allow me to see the visualisation in the Dashboard correctly, but when I'm using the iFrame from the app, I'm getting the following error:

Refused to display 'https://eu-west-1.console.aws.amazon.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

There are many benefits when using the Serverless version of OS, but one of the handicaps is that you can't really modify some of the cluster configurations.

The question is, is there a way to see Visualisations using iFrames (or any other method) from my app?

Thank you

2 Answers
0

I apologize, but it seems there's a misunderstanding in your question. Amazon OpenSearch Serverless does not directly support embedding visualizations as iFrames in the way you're attempting.

The error you're seeing is because you're trying to embed the AWS Console URL, which is not designed to be embedded in iFrames for security reasons.

For OpenSearch Serverless, the recommended approach for embedding visualizations or dashboards in your application is to use the Amazon QuickSight embedding feature. QuickSight can connect to your OpenSearch Serverless collection as a data source and create visualizations that can be embedded in your application.

To embed QuickSight visuals:

  1. Create your visualizations in QuickSight using your OpenSearch Serverless collection as the data source.
  2. Use the QuickSight API to generate embedding URLs for your visuals.
  3. Use these URLs in your application to display the visualizations.

This method allows you to securely embed your visualizations while maintaining access control through IAM.

If you specifically need to use OpenSearch Dashboards, you might need to consider using the non-serverless version of Amazon OpenSearch Service, which provides more configuration options for embedding.

Remember to ensure that your IAM permissions are correctly set up to allow access to both the OpenSearch Serverless collection and QuickSight as needed for your use case.
Sources
RegisteredUserDashboardVisualEmbeddingConfiguration - Amazon QuickSight
Welcome - Amazon OpenSearch Serverless

profile picture
answered a month ago
0

Just for context, Opensearch Dashboards, Serverless or not, does provide you with the option of generating iFrame links for Visualisations as a native feature, and the link I'm trying to access (the URL to the AWS console) is just the URL that is given by the service. I think it's just the combination of Opensearch Serverless Dashboard + iFrames which has something missing. Probably in a managed Opensearch Service will work fine (I'm just guessing here though, as I haven't tried it myself)

I will take a look at the Quicksight suggestion, I didn't think about it and might be a good alternative.

Thanks!

iframe generation

answered a month 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