Replies: 1 comment 1 reply
-
Without knowing what the credentials are being exported for I will give some options based off of the CLI sample you gave above. If there was a command to do this in PowerShell would likely be on this page: https://docs.aws.amazon.com/powershell/v4/reference/items/Common_cmdlets.html Option 1: Exporting as PowerShell environment variables using the CLI:
Option 2: Export the credentials with PowerShell
Option 3: Exporting profile credentials as a session variable in PowerShell
Option 4: Specifying the
Please let us know if any of these options are what you are looking for. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
The AWS CLI command has a sub-command to export the "current" temporary, cached credentials from a specified AWS profile.
For SSO profiles using IAM Identity Center, for example, there are cached credentials that can simply be read off the filesystem and provided to the user. The credential cache is under
$HOME/.aws/sso/cache/
, by default.Question
Does the AWS PowerShell module have an equivalent (to the AWS CLI) command to retrieve the current credentials from the AWS credential cache?
When I Google'd for this, the best result I could find was this AWS CLI issue, but nothing directly related to an equivalent PowerShell command: aws/aws-cli#7388
I wonder if it's already implemented, and I'm just struggling to search for the correct term?
Beta Was this translation helpful? Give feedback.
All reactions