1 Answer
- Newest
- Most votes
- Most comments
1
Could you try the policy below. It's the same as your original policy, except for the addition of the ssm:StartSession permission to arn:aws:ssm:*:*:document/SSM-SessionManagerRunShell without requiring the document to have your custom tags, which it doesn't have:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowStartConnections",
"Effect": "Allow",
"Action": "ssm:StartSession",
"Resource": "arn:aws:ec2:*:[Account ID]:instance/*",
"Condition": {
"StringEquals": {
"aws:ResourceTag/[Tag Key]": "[Value]"
},
"Bool": {
"aws:MultiFactorAuthPresent": "true"
}
}
},
{
"Sid": "AllowStartConnectionsDocument",
"Effect": "Allow",
"Action": "ssm:StartSession",
"Resource": "arn:aws:ssm:*:*:document/SSM-SessionManagerRunShell",
"Condition": {
"Bool": {
"aws:MultiFactorAuthPresent": "true"
}
}
},
{
"Sid": "AllowResumeConnectionTerminateConnection",
"Effect": "Allow",
"Action": [
"ssm:ResumeSession",
"ssm:TerminateSession"
],
"Resource": "arn:aws:ssm:::session/${aws:userid}-*",
"Condition": {
"Bool": {
"aws:MultiFactorAuthPresent": "true"
}
}
},
{
"Sid": "AllowSeveralActionsOfSSM",
"Effect": "Allow",
"Action": [
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:CreateControlChannel"
],
"Resource": "*",
"Condition": {
"Null": {
"aws:ResourceTag/[Tag Key]": "[Value]"
},
"Bool": {
"aws:MultiFactorAuthPresent": "true"
}
}
}
]
}
Relevant content
- asked 7 months ago

ChatGPT After making the modifications, it is now functioning correctly. Thank you very much for your support.