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.

 
Tags
Console Access
API and CLI Access
Session Manager
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"
        }
    ]
}
Customize Policy
* Required field