Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

AWS Tutorials: How to activate AWS EC2 Session Manager?

What is AWS Session Manager?

AWS Session Manager is a managed service provided by Amazon Web Services (AWS) that enables secure and seamless access to instances in the cloud. It allows users to manage and interact with their Amazon Elastic Compute Cloud (EC2) instances or on-premises instances through a web-based console or the AWS Command Line Interface (CLI), without the need for a bastion host or a public IP address.

AWS Session Manager provides a secure way to access instances without exposing them to the internet, and it allows users to control access to instances using AWS Identity and Access Management (IAM) policies. It also provides an audit trail of all session activity, including user access, command history, and output.

With AWS Session Manager, users can securely manage instances and perform administrative tasks, such as installing software, running scripts, and troubleshooting issues, without the need for a VPN or SSH tunnel. It simplifies the management of instances and reduces the attack surface, making it a valuable tool for managing instances at scale.

How to install AWS Systems Manager Agent (SSM Agent) and the Session Manager plugin using user data in ubuntu

#!/bin/bash
sudo snap install amazon-ssm-agent --classic
sudo systemctl enable snap.amazon-ssm-agent.amazon-ssm-agent
sudo systemctl start snap.amazon-ssm-agent.amazon-ssm-agent
sudo snap install session-manager-plugin --classic
Code language: JavaScript (javascript)

To activate AWS EC2 Session Manager, you need to follow these steps:

To activate AWS EC2 Session Manager, you need to follow these steps:

  1. Ensure that you have the required permissions: In order to activate AWS EC2 Session Manager, you should have the following IAM permissions: AmazonEC2RoleforSSM or a custom policy that includes the necessary permissions.
  2. Launch an Amazon EC2 instance: Launch an Amazon EC2 instance or use an existing one on which you want to activate Session Manager.
  3. Install the Session Manager plugin: To activate AWS EC2 Session Manager, you need to have the Session Manager plugin installed on your local machine. You can download the plugin from here. Install the plugin according to your operating system.
  4. Attach an IAM role to the instance: Attach an IAM role to the EC2 instance with the AmazonEC2RoleforSSM policy. If you have created a custom policy, then attach that policy to the instance.
  5. Enable the Session Manager access: In order to enable Session Manager access to the EC2 instance, you need to add the following policy to the instance’s security group:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ssmmessages:CreateControlChannel",
        "ssmmessages:CreateDataChannel",
        "ssmmessages:OpenControlChannel",
        "ssmmessages:OpenDataChannel"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ssm:UpdateInstanceInformation",
        "ssm:ListInstanceAssociations"
      ],
      "Resource": "*"
    }
  ]
}
Code language: JSON / JSON with Comments (json)

  1. Activate Session Manager: Open the AWS Management Console, navigate to the EC2 console and select the instance on which you want to activate Session Manager. Click on the “Connect” button and select “Session Manager”. This will open a new tab in your browser and establish a secure connection to the instance. You can now use the AWS Systems Manager Session Manager to securely manage and access the instance.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 AI SEO Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI SEO tools have become indispensable for digital marketers, businesses, and content creators aiming to dominate search engine rankings. These tools leverage artificial intelligence…

Read More

Top 10 Product Lifecycle Management (PLM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction Product Lifecycle Management (PLM) is a strategic approach to managing a productโ€™s journey from conception through design, manufacturing, and end-of-life. In 2026, PLM software has evolved…

Read More

Top 10 Patch Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction: The Importance of Patch Management in 2026 In 2026, as cyber threats evolve and technology becomes more complex, patch management tools are critical for maintaining cybersecurity…

Read More

Top 10 Headless CMS Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, Headless Content Management Systems (CMS) have become the go-to solution for businesses seeking flexibility, scalability, and a modern approach to content management. Unlike traditional…

Read More

Top 10 AI Lead Scoring Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI lead scoring tools have become indispensable for B2B and B2C businesses aiming to optimize their sales pipelines. These tools leverage artificial intelligence to…

Read More

Top 10 AI Portfolio Optimization Tools in 2026: Features, Pros, Cons & Comparison

Introduction Investment management has always been about making smart choices at the right time. Traditionally, this required endless hours of research, manual calculations, and intuition. But in…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x