AWS Session Manager Step by Step Tutorial¶
- You can find the source code for this video in my GitHub Repo.
Create IAM Role and EC2 Instance¶
SSMFullAccessIAM role and attach
AmazonSSMFullAccessmanaged policy to it.
- Create EC2 instance and attach
- Verify that EC2 instance was registered in AWS Session Manager console.
Create CloudWatch Log Group¶
ssm-sessionCloudWatch log group.
- Update Session Manager settings to use
Install AWS Session Manager Plugin.¶
- Follow instructions for your OS here.
Create IAM Policy and IAM user¶
UserStartSessionPolicyIAM Policy with the following content. Replace
SSMAccessIAM group and attach
developeruser and put it to
aws configureto create default profile.
SSH to EC2 Instance¶
To ssh to the EC2 instance use the following command, replace
Update EC2 tag labels.
Install nginx on EC2 instance.
Port Forward from EC2 to localhost¶
- To port forward from EC2 instance to localhost use the following command, replace
ssm-sessionCloudWatch log group