1 Answer
- Newest
- Most votes
- Most comments
1
Hello.
As stated in the document below, in the case of an AWS managed document, the AWS account part in the ARN must not be specified.
Therefore, I set it to "*".
https://docs.aws.amazon.com/systems-manager/latest/userguide/security_iam_id-based-policy-examples.html
All examples use the US West (Oregon) Region (us-west-2) and contain fictitious account IDs. The account ID shouldn't be specified in the Amazon Resource Name (ARN) for AWS public documents (documents that begin with AWS-*).
Please change the policy as below.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "ssm:StartSession",
"Resource": [
"arn:aws:ssm:us-east-1:*:document/AWS-StartPortForwardingSessionToRemoteHost",
"arn:aws:ec2:us-east-1:**************:instance/*"
],
"Effect": "Allow",
"Sid": "EnableSSMSession"
},
{
"Action": "ec2:DescribeInstances",
"Resource": "*",
"Effect": "Allow",
"Sid": "DescribeEC2"
}
]
}
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 7 months ago
you my friend saved my day. Thank you, I literally spent hours on this.