AWS Session Manager - How to setup and use?
This pattern describes how to connect to an Amazon Elastic Compute Cloud (Amazon EC2) instance by using the Session Manager, a capability of AWS Systems Manager. Using this pattern, you can run bash commands on an EC2 instance through a web browser. Session Manager doesn’t require that you open inbound ports and doesn’t require public IP addresses for EC2 instances. Additionally, it removes the need to maintain bastion hosts with different Secure Shell (SSH) keys. You can govern access to Session Manager with AWS Identity and Access Management (IAM) policies and configure logging, which records important information, such as instance access and actions.
In this pattern, you configure an IAM role and associate it to a Linux EC2 instance that you provision by using an Amazon Machine Image (AMI). You then configure logging in Amazon CloudWatch Logs and use Session Manager to start a session with the instance.
Although this pattern connects to a Linux EC2 instance in the Amazon Web Services (AWS) Cloud, you could use this approach to use Session Manager for connections with other servers, such as on-premises servers or other virtual machines.
Prerequisites
An active AWS account.
Permissions to access the managed node. For instructions, see Control user session access to managed nodes.
VPC endpoints for
ssm,ec2,ec2messages,ssmmessages, ands3. For instructions, see Create VPC endpoints in the Systems Manager documentation.
Target technology stack
Session Manager
Amazon EC2
CloudWatch Logs
Target architecture
Comments
Post a Comment