Introduction
After signing in to the AWS Access Portal, the next step is to make your credentials available on your local machine. This setup enables you to access AWS services from the command line or within your development tools—without needing to log in through the browser each time or rely on long-lived access keys. You’ll accomplish this by creating AWS SSO profiles, which instruct the AWS Command Line Interface (CLI) on how to connect to the correct account and role.Configure Your AWS SSO Profiles
There are two ways to configure your SSO profiles:- Manual method: Best for experienced users who prefer editing the AWS config file directly (covered in this guide).
- Interactive method: Recommended for beginners. Runs
aws configure ssoand walks you through each step.
If you’d like to explore the interactive method, check out the AWS CLI SSO Configuration Guide.
1
Locate Your AWS Config File
The configuration file is where AWS stores profile information. Its location depends on your operating system:
- Linux / macOS:
~/.aws/config - Windows:
%USERPROFILE%\.aws\config
2
Gather the Required Information
From your AWS Access Portal, collect:
- SSO start URL → Typically
https://<company>.awsapps.com/start - Region → The AWS region where Identity Center is configured (e.g.
us-west-2) - Account ID → The 12-digit AWS account number
- Role name → The role you’ll assume (e.g.
Developer,ReadOnlyAccess,Management)
3
Add Your Session and Profile Configuration
Open Template for multiple profiles:
~/.aws/config in a text editor and add your profiles. Replace the placeholders with your own information.Example (single profile):✅ Always use the SSO start URL provided by your administrator.
✅ Only include the accounts and roles you actually have access to.
✅ Follow the suggested profile naming conventions to avoid confusion.
✅ Only include the accounts and roles you actually have access to.
✅ Follow the suggested profile naming conventions to avoid confusion.
4
Save and Verify the File
After saving your changes, verify that everything looks correct:You should see your newly added profile(s) listed.
Special Case: User Management Profile
In our setup, there’s a dedicated profile called<project>-user-management.This profile is used when you need to manage users or access groups in AWS IAM Identity Center. Here’s how it works:
- IAM Identity Center is delegated to the Infrastructure account.
- For most users (non–super admins): Use the Infrastructure credentials with the
<project>-user-managementprofile. - For super admins: You’ll need to use the Organization Management (org mgmt) credentials, since some operations (like changing Access Groups or Users that affect organization-management account) require access at the organization level.
Test Your Configuration
Once your profiles are set up, let’s test them to make sure everything works.This example uses the
<project>-workload-development profile, but you can replace it with the profile you need to test.1
Log In with SSO
Use the profile you just created to log in:This will open your browser for authentication.
2
Verify Identity
Run this command to confirm you’re authenticated:Expected output:
3
Test AWS Services
If your role allows it and the resources exist, you can try listing resources to confirm access:
Helpful Reminders:
- Bookmark your AWS Access Portal URL:
https://<company>.awsapps.com/start/ - Keep your MFA device secure and accessible
- SSO sessions expire (often after 8 hours). Re-authenticate running
aws sso login --profile <project>-workload-development