AWS SSM Start Session Manager | A Quick Guide
AWS SSM Session Manager is a service that lets you control virtual instances (like EC2 instances) in a safe, interactive way without having to use SSH or RDP. It gives managers a secure way to troubleshoot, configure, and control instances by using IAM policies and encryption along with a browser-based shell. This makes remote management jobs easier and makes the system safer by limiting how much instance endpoints are exposed to the public internet.
Starting a Session Using the Systems Manager Console
To begin a session using the AWS Systems Manager console, follow these steps:
- Go to https://console.aws.amazon.com/systems-manager/ to see the AWS Systems Manager interface.
- Use the passwords for your AWS account to log in to the console.
- Choose Session Manager from the list of options.
- If the AWS Systems Manager home page comes up first, click on the menu icon to bring up the navigation box. Then click on Session Manager.
- Click on the choice to start the session.
- In the “Reason for Session” area, give a short explanation of why the session is being started.
- Under Target instances, click on the button to the left of the managed node you want to join to.
- The last step is to click Start session to start the session.
- You can run bash commands (on Linux and macOS) and PowerShell commands (on Windows) once the link has been created.
Starting a Session Using the Amazon EC2 Console
If you prefer using the Amazon EC2 console to start an SSM session, follow these steps:
- Go to the Amazon EC2 console by visiting https://console.aws.amazon.com/ec2/.
- From the navigation panel, select Instances.
- Choose the instance you want to connect to by selecting it.
- Click on Connect.
- Select Session Manager as the connection method.
- Finally, select Connect to establish the session.
- Once the session is active, you can execute bash commands (Linux and macOS) or PowerShell commands (Windows) as needed.
Starting a Session Using the AWS CLI
To initiate an SSM session using the AWS CLI, follow these steps:
- Install and configure the AWS CLI on your local device.
- Ensure that you have completed the necessary setup steps for Session Manager before starting a session.
- Install the Session Manager plugin on your local device. This plugin enables you to run session commands using the AWS CLI.
- Open your terminal or command prompt and run the following command, replacing instance-id with the appropriate value:
aws ssm start-session --target instance-id
By executing the above command, you will successfully start an SSM session using the AWS CLI.
Starting a Session Using SSH
If you prefer starting an SSH session with Session Manager, follow these steps:
- Install SSM Agent version 2.3.672.0 or later on the managed node.
- Open your terminal or command prompt.
- Execute the following command, replacing the placeholders with your own information:
ssh -i /path/my-key-pair.pem username@instance-id
By running the above command, you will establish an SSH session with Session Manager.
Conclusion
In this guide, we have explored multiple methods for starting an AWS SSM session. Whether you choose to use the AWS Systems Manager console, Amazon EC2 console, AWS CLI, or SSH, you now have a thorough understanding of each method’s steps. By following this comprehensive guide, you will be able to effortlessly start an SSM session and leverage its capabilities for managing your AWS resources effectively.
Codeyo Genie is here to help, so don’t forget that. If you need more help or would rather have an expert show you the way. Contact us today to improve how your website works and make sure your users can always get to it.