From 1dec9bcca62a1bfb447d69ab77d601f867b3b401 Mon Sep 17 00:00:00 2001 From: Wei Xu Date: Mon, 13 Mar 2023 17:16:34 +1100 Subject: [PATCH] feat: assume aws role, save crendentials to profile or expose to environment variables (#5) Co-authored-by: Wei Xu --- README.md | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 11a866f..98084f3 100644 --- a/README.md +++ b/README.md @@ -4,32 +4,31 @@ Technically, it's the same with executing `aws sts assume-role --role-arn --session-name --role-arn -``` +- ### Create/Update profile + ```bash + aws-assume-role --profile --session-name --role-arn + ``` -Or add to alias -``` -alias myrole='aws-assume-role --profile --session-name --role-arn ' -``` -and just execute `myrole` at any time you need + Or add to alias + ```bash + alias myrole='aws-assume-role --profile --session-name --role-arn ' + ``` + and just execute `myrole` at any time you need -### Export into current environment variable using `export` -```bash -eval $(aws-assume-role --session-name --role-arn ) -``` +- ### Export into current environment variable using `export` + ```bash + eval $(aws-assume-role --session-name --role-arn ) + ```