aws.amazon.com/about-aws/what…
Connect in the console or via CLI:
$ aws s3 cp s3://ec2-instance-connect/cli/ec2instanceconnectcli-latest.tar.gz .
$ pip install ec2instanceconnectcli-latest.tar.gz
$ mssh instanceid
Automatically setup on amazon linux 2 - can be installed on other machines:
$ sudo yum install ec2-isntance-connect