Option 1
You can use aws login for temporary, secure access. It directs you to the web browser, authenticating with SSO.
For remote, use aws login --remote
Option 2
You can setup keys.
- Create a CLI user in the IAM, give the permissions, save both the keys.
- On terminal, after installing AWS CLI, run
aws configureand put keys, region, and default format (‘json’ is suggested) - Test with
aws sts get-caller-identity