AWS

How to Use aws-vault With AWS Single Sign On

Amazon Web Services (AWS) vault is utilized on projects to deploy secure applications with scalability on the cloud. It then provides the lockdown service for managing secret keys and sensitive data. Moreover, it can be used with the Single Sign On (SSO) which is utilized to authenticate the identity.

This guide will explain how to use AWS Vault with AWS SSO.

Prerequisites

Check if the AWS CLI is installed before working on the AWS Vault:

aws --version

Running the above command will display the installed version of AWS CLI:

Configure the AWS CLI using IAM credentials:

aws configure

To check for the complete process, click here:

Use this command to install AWS Vault:

choco install aws-vault

Verify the installation of the AWS Vault by using this:

aws-vault --version

It can be observed that the AWS Vault version “v6.6.0” has been installed successfully:

Add a Single Sign On user using AWS Vault:

aws-vault add <profile-name>

For instance, we will execute the following command:

aws-vault add linuxhint

Execution of the above command will display the name of the added profile:

Now, check the list of the profiles available in AWS Vault:

aws-vault list

The current list contains a default profile and the “linuxhint” profile has been added previously:

Once the profile is added to the Vault, use any AWS CLI commands with it to manage AWS resources using this syntax:

aws-vault exec <profile-name> -- <aws-cli-command>

Running the above command will display the S3 bucket list:

aws-vault exec linuxhint -- aws s3 ls

This is all about the use of the AWS Vault with AWS SSO.

Conclusion

To use AWS Vault with AWS Single Sign On (SSO), it is required to have AWS CLI installed and configured. After that, install AWS Vault using the Chocolatey package and also verify the installation. Create an SSO profile to the vault and then use it with any AWS CLI command to control AWS resources. This guide has explained the process of using AWS Vault with SSO.

About the author

Talha Mahmood

As a technical author, I am eager to learn about writing and technology. I have a degree in computer science which gives me a deep understanding of technical concepts and the ability to communicate them to a variety of audiences effectively.