To authenticate with aws
using the correct profile, I use aws-vault
. Feel free to remove that and use whatever aws authentication mechanism is relevant for you.
- ssh should be running on the target ec2 instance
- your ssh key should be in
~/.ssh/authorized_keys
on the instance - ssm should be enabled on that instance
AWS_VAULT_PROFILE=my-profile
EC2_INSTANCE=i-abcabcabc