AWS CLI
Setup¶
aws configure sso
- name your profile
default
- so that you don't need to specify
--profile
every time you useaws-cli
- name your profile
Login¶
aws sso login --profile "profileName"
- the default profile is
default
- the default profile is
- Set the
AWS_PROFILE=default
env var
Install SSM
aws ssm start-session \
--target "container-id-ec2, like i-0373fb85e5fbc7d8e" \
--document-name AWS-StartPortForwardingSession \
--parameters '{"portNumber":["22"],"localPortNumber":["56789"]}'
On Windows
aws ssm start-session --target "container-id-ec2, like i-0373fb85e5fbc7d8e" --document-name AWS-StartPortForwardingSession --parameters "{\"portNumber\":[\"22\"],\"localPortNumber\":[\"56789\"]}"
Last update:
2023-04-24