Post

Useful AWS CLI Commands

commands I have found to be useful

Useful AWS CLI Commands

SSM

  • make sure you can ping host within the ec2 instance or use telnet
1
2
3
aws ssm start-session --target ec2-instance-id \
--document-name AWS-StartPortForwardingSessionToRemoteHost \
--parameters host="your-host",portNumber="host-port",localPortNumber="your-port"
  • example for something like Aurora MySQL Cluster
1
2
3
aws ssm start-session --target i-######## \
--document-name AWS-StartPortForwardingSessionToRemoteHost \
--parameters host="name.cluster-randomchars.region.rds.amazonaws.com",portNumber="3306",localPortNumber="9000"
This post is licensed under CC BY 4.0 by the author.