An IAM policy that provides end users the ability start a session to a particular instance and the ability to terminate only their own sessions.

Missing Parameters
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "ssm:StartSession"
            ],
            "Resource": [
                "arn:aws:ec2:::instance/instance-ID"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "ssm:DescribeSessions",
                "ssm:GetConnectionStatus",
                "ssm:DescribeInstanceProperties",
                "ec2:DescribeInstances"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ssm:GetDocument"
            ],
            "Resource": [
                "arn:aws:ssm:::document/SSM-SessionManagerRunShell"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "ssm:TerminateSession"
            ],
            "Resource": "arn:aws:ssm:::session/${aws:username}-*",
            "Effect": "Allow"
        }
    ]
}

Actions



Customize Template

Policy Parameters

* Required field