Embed Amazon QuickSight dashboards in Salesforce - Blog instructions wrong?

The instructions in this blog seem to be wrong. Please correct me if I’m mistaken.

The section I’m referring to :
Add the following permissions required for generating a QuickSight embed URL and save the file to your local machine as policy.json

    "Version": "2012-10-17",
    "Statement": [
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
            "Resource": "*"

Create an IAM role for QuickSight

Next, we create an IAM role via the AWS CLI that we use to create role-backed users. This role doesn’t need permissions and isn’t assumed for this use case, but an assume role policy is required to create the role. See the following code:

echo '{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Principal": {"AWS": "<your account ID>"},"Action": "sts:AssumeRole"}]}' > policy.json
aws iam create-role --role-name QuickSightEmbed --assume-role-policy-document file://policy.json

The echo command over writes the polcy.json document they just said to create and save locally. What is the purpose of creating the Json document locally then running the echo command that pipes the contents to policy.json?

hey @centi , you are correct. The echo command overwrites the policy.json document. you can skip the echo command and directly run the create-role command:

aws iam create-role --role-name QuickSightEmbed --assume-role-policy-document file://policy.json

I have reached out to the blog post owners to make sure that the blog is reviewed again and updated with any corrections as needed.