Bobcares

AWS SSM Start Session | An introduction

by | Jun 21, 2022

AWS SSM start session establishes a Session Manager session connection to a target (for example, a managed node).

As part of our AWS Support Service, Bobcares responds to all inquiries, no matter how big or small.

Let’s take a closer look at how we start a session in AWS using various methods.

AWS SSM start session

To start a session, we can use the AWS Systems Manager console, Amazon Elastic Compute Cloud (Amazon EC2) console, AWS Command Line Interface (AWS CLI), or SSH. It gives us a URL and a token that we can use to open a WebSocket connection and send and receive data.

Start a session using the Systems Manager console.

Firstly, we use the AWS Systems Manager console to start a session with a managed node in the account. Before we start a session, we make sure to complete the setup steps for Session Manager.

  1. Firstly, we go to https://console.aws.amazon.com/systems-manager/ and log in to the AWS Systems Manager console.
  2. Then we select Session Manager from the navigation panel.

    If the AWS Systems Manager home page appears first, select the menu icon to display the navigation panel, and then select Session Manager from the navigation panel.

  3. Then we select the Start session option.
  4. In the Reason for Session field, type a reason for the session.
  5. Then, for Target instances, we select the option button to the left of the managed node to which we wish to connect.
  6. Finally, choose Start session.AWS SSM Start Session

We run bash commands (Linux and macOS) or PowerShell commands (Windows) after the connection is established, just as we would with any other connection type.

Start session using the Amazon EC2 console.

We use the Amazon Elastic Compute Cloud (Amazon EC2) console also to start a session with an instance in the account.

  1. Firstly, go to https://console.aws.amazon.com/ec2/ to access the Amazon EC2 console.
  2. Then we select Instances from the navigation panel.
  3. Then we click Connect after selecting the instance.
  4. Select Session Manager as the connection method.
  5. Finally, select Connect.

We run bash commands (on Linux and macOS) or PowerShell commands (on Windows) after the connection is established, just like we would with any other connection type.

Start session using the AWS CLI.

 

  • Firstly, we install and configure the Amazon Web Services Command Line Interface (AWS CLI).
  • We make sure to complete the setup steps for Session Manager, before we start a session.
  • We need to install the Session manager plugin on our local device before we can use the AWS CLI to run session commands.
  • Run the following command using the AWS CLI, replacing instance-id with our own information to start a session.


    aws ssm start-session \
    --target instance-id

Start session using the SSH

To start a Session Manager SSH session, we install SSM Agent version 2.3.672.0 or later on the managed node.

Run the following command to start an SSH session. Replace the placeholders with our own information in each example resource.

ssh -i /path/my-key-pair.pem username@instance-id

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our Support team shows how we use various methods to start a session in AWS.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.