Logo

dev-resources.site

for different kinds of informations.

Simplifying AWS SSO Setup: The effortless way

Published at
5/29/2024
Categories
aws
sso
terminal
cli
Author
wickenico
Categories
4 categories in total
aws
open
sso
open
terminal
open
cli
open
Author
9 person written this
wickenico
open
Simplifying AWS SSO Setup: The effortless way

Are you struggling with the complexities of configuring AWS SSO profiles for your projects involving data storage in S3 or similar services? In this blog post, we'll guide you through the seamless and effortless process of setting up AWS SSO profiles within AWS Config to get you up and running quickly.

Understanding AWS Profiles

AWS profiles are configurations that define how your AWS CLI commands interact with AWS services. They centralise authentication credentials, region settings, and other parameters to streamline access to AWS resources. By creating different profiles for different purposes or roles, you can provide granular access control and maintain organisational segregation of duties. Understanding AWS profiles enables seamless integration of AWS CLI commands into your workflow, promoting agile development, efficient resource management, and robust security practices.

Prerequisites

  • AWS Account: You must have an active AWS account with appropriate permissions to configure AWS services and manage IAM roles.
  • AWS CLI: Install the AWS Command Line Interface (CLI) tool on your local machine. AWS CLI allows you to interact with AWS services from the command line, simplifying configuration and management tasks. Install the AWS CLI using brew: brew install awscli.
  • AWS IAM privileges: Ensure that your IAM user or role has the necessary permissions to create and manage AWS Config rules and AWS SSO configurations. This includes permissions to access the AWS Management Console and make changes to IAM policies and roles.

Setting Up AWS SSO Profiles in AWS Config: A Step-by-Step Guide

The AWS CLI provides a built-in step-by-step guide for setting up SSO profiles. You can invoke it with `aws configure sso'.

  1. SSO Session Name (Recommended): Choose a descriptive name, ideally with a reference to the environment or stage like dev, prod or staging.
  2. SSO Start URL [None]: Specify the URL where the process of selecting a profile begins within the AWS Management Console.
  3. SSO Region [None]: Indicate the region associated with your AWS account.
  4. SSO Registration Scopes [sso:account:access]: This initiates a browser window for granting access to your AWS profiles. Upon confirmation, you can proceed to select accounts and roles via the terminal.
  5. CLI Default Client Region [eu-central-1]: Reiterate your preferred region setting.
  6. CLI Default Output Format [None]: Simply press Enter to confirm.

Once configured, you can verify your profile by executing:

aws s3 ls --profile dev-admin

This command will list the contents of your S3 bucket using the specified profile, in this case, "dev-admin".

Setting Up AWS SSO Profile directly in Configuration File

Another effective method for adding a profile is by directly modifying the config file.

To access the file in the terminal, use the command cat ~/.aws/config.
Within this file, you can insert a profile block resembling the following example:

AWS SSO Profile

After adding the block and saving the file, you can seamlessly utilize the profile.

Logging in with AWS SSO Profiles

First, export the AWS profile in the terminal where you want to use AWS CLI commands:

export AWS_PROFILE=dev-admin

Next, log in to your profile with the following command:

aws sso login

A new browser window will open, prompting you to confirm your login attempt.

Great! You are now logged in with your dev-admin profile.

To check which profile you are currently logged in with, use the command:

aws sts get-caller-identity.

For a deeper view you can visit the AWS documentation: https://docs.aws.amazon.com/cli/latest/userguide/sso-using-profile.html.

sso Article's
30 articles in total
Favicon
Top API Management Tools for Enterprise 2025
Favicon
Using Clerk SSO to access Google Calendar and other service data
Favicon
SSO with Firebase Authentication
Favicon
SSO (Single Sign-On) and Identity Federation: A Cloud Engineer's Perspective
Favicon
Migrating AWS Organizations: How I Did It and Why
Favicon
I Studied How Google Signs You Into All Services With One Login. Here's What I Learned
Favicon
Simplified Configuration of SSO Profiles in AWS CLI Using SSO Sessions
Favicon
Harness Authentication Capabilities
Favicon
Error when retrieving token from sso Token has expired and refresh failed
Favicon
The Significance of Single Sign-On (SSO) in the Modern Business World
Favicon
An Overview of the Kalp Studio Authentication
Favicon
Switch between AWS accounts in your CLI like never before!
Favicon
How Single Sign-On Boosts Your Business Security (And Makes Life Easier)?
Favicon
Understanding Single Sign-On (SSO) and SAML: Simplified
Favicon
SSO Simplified: Enhancing Security and User Experience
Favicon
Okta vs Keycloak: Comparison and easy Okta to Keycloak migration guide
Favicon
Exploring the Single Sign-On Feature of Postman
Favicon
What is SSO ID, Know about it
Favicon
Django application with allauth configuration.
Favicon
AWS SSO Credentials With Multiple Accounts
Favicon
Understanding SAML and SSO: A Detailed Comparison
Favicon
Securing Angular Apps with Keycloak
Favicon
Configure CIDAAS as an Identity Provider in Software AG Cloud for Single sign-on
Favicon
why choose infisign.ai for The Future of Identity and Access Management (IAM)
Favicon
Setup SSO With Keycloak And Multiple Services
Favicon
Build vs. Buy: How to approach SSO for your SaaS app
Favicon
SSO Authentication in 2024: A Practical Guide
Favicon
Skip the SSO tax with Pomerium
Favicon
Simplifying AWS SSO Setup: The effortless way
Favicon
Switching Identity Providers in the IAM Identity Center

Featured ones: