Skip to content

Add aws-vault export cmd#1135

Merged
mtibben merged 1 commit intomasterfrom
add-export-cmd
Feb 16, 2023
Merged

Add aws-vault export cmd#1135
mtibben merged 1 commit intomasterfrom
add-export-cmd

Conversation

@mtibben
Copy link
Copy Markdown
Member

@mtibben mtibben commented Feb 16, 2023

The exec --json flag was always a bit weird, because the --json flag changes the behaviour and doesn't "exec" anything at all.

This remedies that weirdness by creating a aws-vault export command that exports credentials in a variety of formats.

  • aws-vault export --format=env PROFILE prints in env-var format e.g. FOO=BAR
  • aws-vault export --format=export-env PROFILE prints in env-var format with en export e.g. export FOO=BAR
  • aws-vault export --format=json PROFILE prints in json format compatible with credentials_process
  • aws-vault export --format=ini PROFILE prints in ini format compatible with ~/.aws/credentials

The old exec --json flag still works but also prints out a deprecation notice to stderr

Fixes #761 #816

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Change aws-vault exec <PROFILE> -j from JSON export to Env Variable Format

1 participant