Моя полиси:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssm:StartSession"
],
"Resource": [
"arn:aws:ec2:*:*:instance/*"
],
"Condition": {
"StringLike": {
"ssm:resourceTag/QCCanSSH": [
"True"
]
}
}
},
{
"Effect": "Allow",
"Action": [
"ssm:TerminateSession"
],
"Resource": [
"arn:aws:ssm:*:*:session/${aws:username}-*"
]
}
]
}
aws ssm start-session работает, а aws ssm start-session --document-name AWS-StartSSHSession ругается
An error occurred (AccessDeniedException) when calling the StartSession operation: User: arn:aws:iam::acc_id:user/username is not authorized to perform: ssm:StartSession on resource: arn:aws:ssm:us-east-1::document/AWS-StartSSHSession