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": [
"quicksight:GetDashboardEmbedUrl",
"quicksight:RegisterUser",
"quicksight:GetAuthCode"
],
"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?