An error occurred (InvalidParameterValueException) when calling the CreateAnalysis operation: URL must be a valid HTTPS scheme and from a separate origin

I am attempting to create a Quicksight analysis using the “create-analysis” cli command and basing it off of the analysis definition description of an existing analysis in another Quicksight account and I am getting this error. I am not really understanding what this means. Can anyone assist?

An error occurred (InvalidParameterValueException) when calling the CreateAnalysis operation: URL must be a valid HTTPS scheme and from a separate origin.
at Visual 3040985d-eb96-4c1c-a3cf-a1d072bfb5d6,
at Sheet 5cbdec94-f963-4094-b00f-bb2691bca774.

Hello @zephyr , welcome to the Quicksight community!

Could you share an anonymized version of the cli command you ran as well as a snippet of the that target visual that the error pointed to? This would help see if there is something about the definition that is causing the problem.

@zephyr make sure aws-cli is up to date. I am not 100% sure you can use cross-account reff.

@nshah-quicksight My aws-cli is updated to the latest version 2.13.27. Thanks for the suggestion.

@duncan Here is the anonymized cli command that I ran. The input json is the analysis definition description from the other quicksight environment.

aws quicksight create-analysis --cli-input-json file://REDACTED PATH\analysisv1.json

and here is a snippet of the visual taken from the json of the analysis definition description.

“Visuals”: [
“CustomContentVisual”: {
“VisualId”: “3040985d-eb96-4c1c-a3cf-a1d072bfb5d6”,
“Title”: {
“Visibility”: “HIDDEN”
“Subtitle”: {
“Visibility”: “HIDDEN”
“ChartConfiguration”: {
“ContentUrl”: “https://REDACTED PATH
“Actions”: [ ],
“DataSetIdentifier”: “REDACTED DATASET

Please let me know if I can provide anything else that might help shed light on this issue.

Hey @zephyr !

I would try the following command: aws quicksight create-analysis --aws-account-id [xxxxxxxxx] --analysis-id [xxxxxxx] --cli-input-json file://pathtofile.analysisdefinition.json --name "[analysis name]"

The account Id needs to be your target account id and the analysis Id I believe can stay the same because the analysis id should be unique to the account.

I want to rule out that it wasn’t the command before going too far on the JSON itself. Let me know if this helps!

@duncan I’m sorry, I should have mentioned that the analysis json file that I am using for the definition includes all of the required parameters for that cli including the analysis id, analysis name, and aws account id. Just to rule out the possibility of this being the problem, I did go ahead and explicitly add the above 3 parameters (–aws-account-id, --analysis-id, --name) into the cli command and it didn’t change anything. I am still getting the same original error.

Okay, so I figured out the issue here. The “ContentUrl” was pointing to a url that was being hosted as a static webpage coming from an S3 bucket that I didn’t have access to. I changed the url to an s3 bucket that I do have access to and it fixed the issue, allowing me to to create the analysis. Thank you for the assistance @duncan @nshah-quicksight

1 Like

Hey @zephyr, thank you for sharing the solution!

1 Like