SCC
Brasil
os cloud gurus
Software Cloud Consulting
Your software development, cloud, consulting & shoring company
If you worked with AWS and EC2 for a while, you probably connected a lot with key pairs and ssh.
For example 'ssh -i "mykeypair.pem" ec2-user@myIpAdress
With this approach you need the keypair on your local machine and you need to allow traffic from
you VPC where the instance is hosted to your local machine and
of course you need to open the SecurityGroup of your instance to allow traffic to you local
machine
If you are not connected with DirectConnect or VPN this is already a security issue. You will
have to open Port 22 for the internet or you have to adapt the public IP address
of you local machine in the SecurityGroup
The SystemsManager has by now the feature SessionManager which will simplify your life here .
And also improve the security of your system by allowing you to close Security Group Ports
To grant access to your machines ( or connecting with ssh to your machines) you use by now IAM,
not keypairs and open Ports
You can now login from anywhere where you have access to the AWS Web Console
You can also log the commands into CloudWatch
SSMInstanceRole: Type: 'AWS::IAM::Role' Properties: RoleName: 'My-SMM-InstanceRole' AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: Service: - ec2.amazonaws.com Action: 'sts:AssumeRole' Path: / ManagedPolicyArns: - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCoreAfter creating your role, you must assign this role to your EC2 instances. Or as mentioned extend your exisiting role(s) to allow access to SSM Service