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 a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

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

Introduction In 2026, AI infographic creators have become essential tools for businesses, marketers, educators, and content creators who need to transform complex data into visually compelling stories….

Read More

Top 11 AI Personalized Learning Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI personalized learning tools have transformed education and training, tailoring content to individual learner needs with unprecedented precision. These tools leverage machine learning, natural…

Read More

Top 10 Accounting Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, the importance of accounting software continues to grow, helping businesses of all sizes streamline financial management, improve accuracy, and stay compliant with ever-changing regulations….

Read More

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

Introduction In 2026, businesses of all sizes are increasingly reliant on a variety of devices—laptops, desktops, mobile devices, and other endpoints—that connect to their networks. With the…

Read More

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

Introduction In 2026, managing orders has become a sophisticated process, requiring advanced tools to handle large volumes, multiple sales channels, and intricate supply chains. Order Management Systems…

Read More

What is Veracode and use cases of Veracode?

What is Veracode? Veracode is a leading application security (AppSec) platform that helps organizations identify and remediate vulnerabilities in their software throughout the development lifecycle. By integrating…

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