docs: fix reference to example role in aws console access (#64358)

* docs: fix reference to example role in aws console

* docs: remove extra line
This commit is contained in:
Steven Martin
2026-03-06 16:16:07 +00:00
committed by GitHub
parent f0ac97a81c
commit d496c309f2
@@ -175,34 +175,6 @@ AWS APIs.
--assume-role-policy-document file://app-service-tp.json
```
1. Get the ARN of the `ExampleReadOnlyAccess` role:
```code
$ ROLE_ARN=$(aws iam get-role --role-name ExampleReadOnlyAccess --query "Role.Arn" --output text)
```
1. Define an IAM policy to allow the Teleport Application Service to assume the
`ExampleReadOnlyAccess` role:
```code
$ cat<<EOF > teleport-assume-role.json
{ "Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "${ROLE_ARN}"
}
]
}
EOF
$ POLICY_ARN=$(aws iam create-policy --policy-name=AssumeExampleReadOnlyRole \
--policy-document file://teleport-assume-role.json | jq -r '.Policy.Arn')
$ aws iam attach-role-policy --role-name TeleportAWSAccess \
--policy-arn ${POLICY_ARN}
```
### Configure a role for Teleport users to request
In this section, you will create a role that Teleport users can request access
@@ -291,6 +263,34 @@ this role when proxying requests:
$ aws iam attach-role-policy --role-name ExampleReadOnlyAccess --policy-arn $ARN
```
1. Get the ARN of the `ExampleReadOnlyAccess` role:
```code
$ ROLE_ARN=$(aws iam get-role --role-name ExampleReadOnlyAccess --query "Role.Arn" --output text)
```
1. Define an IAM policy to allow the Teleport Application Service to assume the
`ExampleReadOnlyAccess` role:
```code
$ cat<<EOF > teleport-assume-role.json
{ "Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "${ROLE_ARN}"
}
]
}
EOF
$ POLICY_ARN=$(aws iam create-policy --policy-name=AssumeExampleReadOnlyRole \
--policy-document file://teleport-assume-role.json | jq -r '.Policy.Arn')
$ aws iam attach-role-policy --role-name TeleportAWSAccess \
--policy-arn ${POLICY_ARN}
```
### Associate a role with the Teleport Application Service
Now that you have created a role for the Teleport Application Service, associate