<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Eduar Castaño</title>
    <description>The latest articles on Forem by Eduar Castaño (@eduartech).</description>
    <link>https://forem.com/eduartech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3135657%2Fae636787-d6f9-4bad-96af-39b1952adac2.jpg</url>
      <title>Forem: Eduar Castaño</title>
      <link>https://forem.com/eduartech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/eduartech"/>
    <language>en</language>
    <item>
      <title>AWS Authentication: IAM Identity Center (SSO) - The right way in 2026</title>
      <dc:creator>Eduar Castaño</dc:creator>
      <pubDate>Fri, 13 Mar 2026 01:26:44 +0000</pubDate>
      <link>https://forem.com/aws-builders/aws-authentication-iam-identity-center-sso-the-right-way-in-2026-4409</link>
      <guid>https://forem.com/aws-builders/aws-authentication-iam-identity-center-sso-the-right-way-in-2026-4409</guid>
      <description>&lt;p&gt;The right way to authenticate in AWS in 2026. Goodbye access keys, hello temporary credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with access keys
&lt;/h2&gt;

&lt;p&gt;For years, the "normal" way to use the AWS CLI was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure
&lt;span class="c"&gt;# Access Key: AKIAIOSFODNN7EXAMPLE&lt;/span&gt;
&lt;span class="c"&gt;# Secret Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCY...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Problems:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Credentials never expire (until you delete them manually)&lt;/li&gt;
&lt;li&gt;If you push them to Git by mistake → serious security breach&lt;/li&gt;
&lt;li&gt;Each dev has different credentials → hard to manage&lt;/li&gt;
&lt;li&gt;When someone leaves the company, you have to delete their keys manually&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AWS no longer recommends this method for humans.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution: IAM Identity Center (SSO)
&lt;/h2&gt;

&lt;p&gt;Previously called "AWS SSO". It's the recommended method since 2022 and the standard in 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temporary credentials (expire automatically every 8-12 hours)&lt;/li&gt;
&lt;li&gt;Single login for multiple AWS accounts&lt;/li&gt;
&lt;li&gt;Integration with identity providers (Google Workspace, Okta, Azure AD)&lt;/li&gt;
&lt;li&gt;Built-in MFA&lt;/li&gt;
&lt;li&gt;When someone leaves, they lose access automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS CLI v2 (v1 doesn't support SSO)&lt;/li&gt;
&lt;li&gt;An AWS account with admin permissions (for initial setup)&lt;/li&gt;
&lt;li&gt;Browser for login&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setup: Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Enable IAM Identity Center
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;In AWS Console:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to: &lt;strong&gt;IAM Identity Center&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Enable"&lt;/strong&gt; (it's free, no cost)&lt;/li&gt;
&lt;li&gt;Confirm the region (recommended: &lt;code&gt;us-east-1&lt;/code&gt; or your primary region)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AWS will automatically create the necessary infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Choose identity source
&lt;/h3&gt;

&lt;p&gt;You have 3 options:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option A: IAM Identity Center directory&lt;/strong&gt; (for general purposes)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS creates its own directory&lt;/li&gt;
&lt;li&gt;You manage users directly in AWS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Option B: Active Directory&lt;/strong&gt; (for companies with on-premise AD)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connects with an existing AD&lt;/li&gt;
&lt;li&gt;Users and groups sync automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Option C: External Identity Provider&lt;/strong&gt; (most common in companies)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Workspace, Okta, Azure AD, etc.&lt;/li&gt;
&lt;li&gt;True Single Sign-On&lt;/li&gt;
&lt;li&gt;Ideal for: teams already using an IdP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this guide, we'll use &lt;strong&gt;Option A&lt;/strong&gt; (simplest).&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Create first user
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Using IAM Identity Center directory:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IAM Identity Center → &lt;strong&gt;Users&lt;/strong&gt; → &lt;strong&gt;Add user&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Fill in:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   Username: ed.developer
   Email: ed@example.com
   First name: Ed
   Last name: Dev
   Display name: Ed Developer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Add user&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;An activation link will be sent by email&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Activate user:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the email&lt;/li&gt;
&lt;li&gt;Click the link&lt;/li&gt;
&lt;li&gt;Create a password&lt;/li&gt;
&lt;li&gt;Set up MFA (recommended: authenticator app like Google Authenticator)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  4. Create a group
&lt;/h3&gt;

&lt;p&gt;Best practice: assign permissions to groups, not individual users.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IAM Identity Center → &lt;strong&gt;Groups&lt;/strong&gt; → &lt;strong&gt;Create group&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Name: &lt;code&gt;Developers&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Description: &lt;code&gt;Development team with PowerUser access&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create group&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add users to group&lt;/strong&gt; → select the user → &lt;strong&gt;Add users&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  5. Assign permissions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;IAM Identity Center → &lt;strong&gt;AWS accounts&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select your AWS account&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Assign users or groups&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Tab &lt;strong&gt;Groups&lt;/strong&gt; → select &lt;code&gt;Developers&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission sets&lt;/strong&gt; → select &lt;strong&gt;PowerUserAccess&lt;/strong&gt; (allows almost everything except IAM)

&lt;ul&gt;
&lt;li&gt;For full admin: &lt;code&gt;AdministratorAccess&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;For readonly: &lt;code&gt;ViewOnlyAccess&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt; → &lt;strong&gt;Submit&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The process takes 1-2 minutes to apply.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Get SSO Start URL
&lt;/h3&gt;

&lt;p&gt;The "SSO Start URL" is the gateway to AWS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IAM Identity Center → &lt;strong&gt;Dashboard&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Copy the &lt;strong&gt;AWS access portal URL&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;It looks like: &lt;code&gt;https://d-9067xxxxxx.awsapps.com/start&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Configure AWS CLI with SSO
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install AWS CLI v2
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;aws cli&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure SSO profile
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure sso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSO session name (Recommended):&lt;/strong&gt; &lt;code&gt;my-sso&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A name for the session&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;work&lt;/code&gt;, &lt;code&gt;personal&lt;/code&gt;, &lt;code&gt;company-name&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SSO start URL:&lt;/strong&gt; &lt;code&gt;https://d-9067xxxxxx.awsapps.com/start&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The one generated from the Dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SSO region:&lt;/strong&gt; &lt;code&gt;us-east-1&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The region where IAM Identity Center was enabled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SSO registration scopes:&lt;/strong&gt; (Enter for default)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leave the default: &lt;code&gt;sso:account:access&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The browser will open&lt;/strong&gt; → authorize access → available AWS accounts will be shown.&lt;/p&gt;

&lt;p&gt;Select:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS account:&lt;/strong&gt; account (12-digit number)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM role:&lt;/strong&gt; &lt;code&gt;PowerUserAccess&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Back in the terminal:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CLI default client Region:&lt;/strong&gt; &lt;code&gt;us-east-1&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Region for resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CLI default output format:&lt;/strong&gt; &lt;code&gt;json&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Options: &lt;code&gt;json&lt;/code&gt;, &lt;code&gt;yaml&lt;/code&gt;, &lt;code&gt;text&lt;/code&gt;, &lt;code&gt;table&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CLI profile name:&lt;/strong&gt; &lt;code&gt;dev&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Profile name&lt;/li&gt;
&lt;li&gt;Examples: &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;work&lt;/code&gt;, &lt;code&gt;personal&lt;/code&gt;, &lt;code&gt;default&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Done! The profile is configured.&lt;/p&gt;




&lt;h2&gt;
  
  
  Using SSO day to day
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Login
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# First time or when credentials expire&lt;/span&gt;
aws sso login &lt;span class="nt"&gt;--profile&lt;/span&gt; dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser opens, you log in (with MFA if applicable), and you're done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Credentials valid for ~8 hours.&lt;/strong&gt; When they expire, run &lt;code&gt;aws sso login&lt;/code&gt; again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Running commands
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Option 1: Specify profile in each command
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; dev
aws lambda list-functions &lt;span class="nt"&gt;--profile&lt;/span&gt; dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Option 2: Set default profile for the session
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dev
aws s3 &lt;span class="nb"&gt;ls
&lt;/span&gt;aws lambda list-functions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verify credentials
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sts get-caller-identity &lt;span class="nt"&gt;--profile&lt;/span&gt; dev

&lt;span class="c"&gt;# Output:&lt;/span&gt;
&lt;span class="c"&gt;# {&lt;/span&gt;
&lt;span class="c"&gt;#   "UserId": "AROAXXXXX:ed.developer",&lt;/span&gt;
&lt;span class="c"&gt;#   "Account": "123456789012",&lt;/span&gt;
&lt;span class="c"&gt;#   "Arn": "arn:aws:sts::123456789012:assumed-role/..."&lt;/span&gt;
&lt;span class="c"&gt;# }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Logout
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sso &lt;span class="nb"&gt;logout&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Multiple profiles (work + personal)
&lt;/h2&gt;

&lt;p&gt;You can have several profiles configured:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Configure work profile&lt;/span&gt;
aws configure sso
&lt;span class="c"&gt;# ... follow wizard, name profile: work&lt;/span&gt;

&lt;span class="c"&gt;# Configure personal profile&lt;/span&gt;
aws configure sso
&lt;span class="c"&gt;# ... follow wizard, name profile: personal&lt;/span&gt;

&lt;span class="c"&gt;# Use each one&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; work
aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; personal

&lt;span class="c"&gt;# Or switch between them&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;work
aws s3 &lt;span class="nb"&gt;ls

export &lt;/span&gt;&lt;span class="nv"&gt;AWS_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;personal
aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  View configuration
&lt;/h2&gt;

&lt;p&gt;Profiles are stored in &lt;code&gt;~/.aws/config&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.aws/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[profile dev]&lt;/span&gt;
&lt;span class="py"&gt;sso_session&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;my-sso&lt;/span&gt;
&lt;span class="py"&gt;sso_account_id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;123456789012&lt;/span&gt;
&lt;span class="py"&gt;sso_role_name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;PowerUserAccess&lt;/span&gt;
&lt;span class="py"&gt;region&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;us-east-1&lt;/span&gt;
&lt;span class="py"&gt;output&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;json&lt;/span&gt;

&lt;span class="nn"&gt;[sso-session my-sso]&lt;/span&gt;
&lt;span class="py"&gt;sso_start_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;https://d-9067xxxxxx.awsapps.com/start&lt;/span&gt;
&lt;span class="py"&gt;sso_region&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;us-east-1&lt;/span&gt;
&lt;span class="py"&gt;sso_registration_scopes&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;sso:account:access&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common troubleshooting
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Error: "Token has expired"
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Solution: Login again&lt;/span&gt;
aws sso login &lt;span class="nt"&gt;--profile&lt;/span&gt; dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Error: "No credentials"
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check that the profile exists&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.aws/config

&lt;span class="c"&gt;# Make sure to specify the profile&lt;/span&gt;
aws s3 &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; dev

&lt;span class="c"&gt;# Or set it as default&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Browser doesn't open
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Use device code flow (manual)&lt;/span&gt;
aws configure sso &lt;span class="nt"&gt;--use-device-code&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will generate a code to enter manually in the browser.&lt;/p&gt;

&lt;h3&gt;
  
  
  "Profile not found"
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# List profiles&lt;/span&gt;
aws configure list-profiles

&lt;span class="c"&gt;# Reconfigure the profile&lt;/span&gt;
aws configure sso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Credentials expire too fast
&lt;/h3&gt;

&lt;p&gt;This is normal (security). AWS rotates credentials every 8-12 hours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Create an alias:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# In .bashrc or .zshrc&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;awsl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'aws sso login --profile dev'&lt;/span&gt;

&lt;span class="c"&gt;# Now just:&lt;/span&gt;
awsl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to use access keys
&lt;/h2&gt;

&lt;p&gt;Only in these cases:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. CI/CD pipelines
&lt;/h3&gt;

&lt;p&gt;GitHub Actions, GitLab CI, Jenkins, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# GitHub Actions example&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Configure AWS Credentials&lt;/span&gt;
  &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws-actions/configure-aws-credentials@v4&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;aws-access-key-id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_ACCESS_KEY_ID }}&lt;/span&gt;
    &lt;span class="na"&gt;aws-secret-access-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_SECRET_ACCESS_KEY }}&lt;/span&gt;
    &lt;span class="na"&gt;aws-region&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;us-east-1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Serverless applications
&lt;/h3&gt;

&lt;p&gt;Lambdas, ECS containers → use &lt;strong&gt;IAM roles&lt;/strong&gt;, not access keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Always use SSO for humans&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MFA enabled&lt;/strong&gt; in IAM Identity Center&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Least privilege:&lt;/strong&gt; assign only the necessary permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Groups, not users:&lt;/strong&gt; permissions at the group level&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit access:&lt;/strong&gt; review logs in CloudTrail&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't share access keys&lt;/strong&gt; between people&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't use root account&lt;/strong&gt; for daily tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick reference commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# SSO Login&lt;/span&gt;
aws sso login &lt;span class="nt"&gt;--profile&lt;/span&gt; dev

&lt;span class="c"&gt;# Verify identity&lt;/span&gt;
aws sts get-caller-identity &lt;span class="nt"&gt;--profile&lt;/span&gt; dev

&lt;span class="c"&gt;# List profiles&lt;/span&gt;
aws configure list-profiles

&lt;span class="c"&gt;# View profile configuration&lt;/span&gt;
aws configure list &lt;span class="nt"&gt;--profile&lt;/span&gt; dev

&lt;span class="c"&gt;# Set default profile for current session&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dev

&lt;span class="c"&gt;# Logout&lt;/span&gt;
aws sso &lt;span class="nb"&gt;logout&lt;/span&gt; &lt;span class="nt"&gt;--profile&lt;/span&gt; dev

&lt;span class="c"&gt;# Reconfigure profile&lt;/span&gt;
aws configure sso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced configuration
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Profile with different roles
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# In ~/.aws/config&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;profile dev]
sso_session &lt;span class="o"&gt;=&lt;/span&gt; my-sso
sso_account_id &lt;span class="o"&gt;=&lt;/span&gt; 111111111111
sso_role_name &lt;span class="o"&gt;=&lt;/span&gt; PowerUserAccess
region &lt;span class="o"&gt;=&lt;/span&gt; us-east-1

&lt;span class="o"&gt;[&lt;/span&gt;profile dev-readonly]
sso_session &lt;span class="o"&gt;=&lt;/span&gt; my-sso
sso_account_id &lt;span class="o"&gt;=&lt;/span&gt; 111111111111
sso_role_name &lt;span class="o"&gt;=&lt;/span&gt; ViewOnlyAccess
region &lt;span class="o"&gt;=&lt;/span&gt; us-east-1

&lt;span class="o"&gt;[&lt;/span&gt;profile prod]
sso_session &lt;span class="o"&gt;=&lt;/span&gt; my-sso
sso_account_id &lt;span class="o"&gt;=&lt;/span&gt; 222222222222
sso_role_name &lt;span class="o"&gt;=&lt;/span&gt; ReadOnlyAccess
region &lt;span class="o"&gt;=&lt;/span&gt; us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html" rel="noopener noreferrer"&gt;IAM Identity Center User Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html" rel="noopener noreferrer"&gt;AWS CLI SSO Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html" rel="noopener noreferrer"&gt;IAM Security Best Practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html" rel="noopener noreferrer"&gt;AWS Organizations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enable IAM Identity Center&lt;/li&gt;
&lt;li&gt;Create user/group&lt;/li&gt;
&lt;li&gt;Assign permissions (PowerUserAccess)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aws configure sso&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aws sso login --profile dev&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Profit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Access keys only for CI/CD. For everything else: SSO.&lt;/p&gt;

</description>
      <category>sso</category>
      <category>iam</category>
      <category>security</category>
      <category>authentication</category>
    </item>
  </channel>
</rss>
