Skip to content

Useful scripts for getting assume role/ temp credentials for aws accounts

Notifications You must be signed in to change notification settings

mahesh031/aws-assume-role-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

aws-assume-role-scripts

Useful scripts for getting assume role/ temp credentials for aws accounts.

The repository contains two script files. Any of these scripts can be used to get the credentials from the AWS account based on the feasibility.

Pre-requisites

"jq" needs to be installed

with-env-variables.sh

Easy to use script where one has to just provide the aws access key, secret key and aws role Arn.
Based on the inputs, temporary session token will be created.
Session token along with access and secret keys can be used to fetch the resources from AWS.

with-profile-option.sh

Script creates the aws credentials and config file under temporary location. Script populates the credentials and necessary porfile details as well.

Following AWS environment variables wil be used to override the default location of ".aws/credentials" and "'.aws/config" files respectively.

AWS_SHARED_CREDENTIALS_FILE
AWS_CONFIG_FILE

USAGE:

Replace the following place holders with valid values:
${awsAccessKeyId} - AWS access key
${awsSecretAccessKey} - AWS secret ke y
${awsRegion} - AWS account region
${awsRoleArn} - AWS assume role ARN

About

Useful scripts for getting assume role/ temp credentials for aws accounts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages