Connect to AWS SSO and SSH into EC2 Instance

Two paths depending on your setup - follow one: Without SSO: personal AWS account, direct IAM credentials With SSO: enterprise/team setup with an SSO start URL (e.g. https://company.awsapps.com/start) Prerequisites Without SSO: AWS CLI v2 AWS IAM user credentials (Access Key ID and Secret Access Key) Terminal With SSO: AWS CLI v2 AWS SSO start URL and access Terminal Files you will need ~/ ├── .aws/ │ ├── config │ └── credentials └── .ssh/ ├── ec2-key.pem └── config Path A: Without SSO Create .aws folder if it doesn’t exist. Run from your home directory (~). ...

March 17, 2025 · 2 min · 283 words