Posts

Showing posts from October, 2024

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 Service...