Skip to content

tpecca/STSlinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

STSlinger

Helps you assume administrative roles in various AWS accounts without having to rely on pre-configured AWS Profiles.

This especially helps with CI/CD pipelines for aws cli commands that require --profile flags.

Using STSlinger:

Please configure env-conf.json with your pre-existing admin roles created in your accounts.

It consists of role (the role to assume) and region for some region specific operations.

python main.py <environment>

For Pipelines:

The output of this script is clean in a way that we can source it directly.

eval "$(python main.py <environment>)"

The argument can be used in dynamic pipelines or dynamic settings, as well. You could use this pattern:

# Describe the env with this variable and use it along with the rest of the commands

"ENV=${@#--}"

# Sample

"deploy-backend": [
  "ENV=${@#--}",
  "eval $(python main.py $ENV",
  "pip install -r requirements.txt",
  "python infrastructure/modules/get-secrets/getSecrets.py $ENV",
  "bash infrastructure/modules/deploy-backend/deploy-backend.sh $ENV"
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages