1 Answer
- Newest
- Most votes
- Most comments
1
Unfortunately, Systems Manager does not seem to allow a Document to be specified for the Condition Key.
How about the following IAM policy?
SessionDocumentAccessCheck can be used to enforce the use of AWS-StartSSHSession.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"NotAction": [
"ssm:*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ssm:StartSession",
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ssm:*:*:document/AWS-StartSSHSession"
],
"Condition": {
"BoolIfExists": {
"ssm:SessionDocumentAccessCheck": "true"
}
}
}
]
}
answered 2 years ago
Relevant content
- asked 7 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 4 months ago
Works as i wanted, thank you very much.