Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aws-vault export cmd #1135

Merged
merged 1 commit into from
Feb 16, 2023
Merged

Add aws-vault export cmd #1135

merged 1 commit into from
Feb 16, 2023

Conversation

mtibben
Copy link
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