Skip to content

Instantly share code, notes, and snippets.

@ps2goat
Created November 19, 2018 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ps2goat/c6fb0da158b673937da772a9a64d5eeb to your computer and use it in GitHub Desktop.
Save ps2goat/c6fb0da158b673937da772a9a64d5eeb to your computer and use it in GitHub Desktop.
# uses the aws iam authenticator to generate a token and store the result in a variable,
# then set the result's value into the clipboard for pasting.
# Replace the values in square brackets (including the brackets) with the correct values.
$x = aws-iam-authenticator token -i [your cluster name] -r [your assumed iam role name] | ConvertFrom-Json; Set-Clipboard -Value ($x.status.token)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment