Created
October 2, 2024 12:46
-
-
Save paddy74/8a4bf0e9f5b04fee4ecfdcc267c83ddf to your computer and use it in GitHub Desktop.
Clear all AWS related environment variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clear all AWS related environment variables | |
function awskill { | |
Remove-Item -Path Env:AWS_DEFAULT_PROFILE -ErrorAction SilentlyContinue | |
Remove-Item -Path Env:AWS_ACCESS_KEY_ID -ErrorAction SilentlyContinue | |
Remove-Item -Path Env:AWS_SECRET_ACCESS_KEY -ErrorAction SilentlyContinue | |
Remove-Item -Path Env:AWS_SECRET_KEY -ErrorAction SilentlyContinue | |
Remove-Item -Path Env:AWS_SECURITY_TOKEN -ErrorAction SilentlyContinue | |
Remove-Item -Path Env:AWS_SESSION_TOKEN -ErrorAction SilentlyContinue | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Clear all AWS related environment variables | |
awskill () { | |
unset AWS_DEFAULT_PROFILE | |
unset AWS_ACCESS_KEY_ID | |
unset AWS_SECRET_ACCESS_KEY | |
unset AWS_SECRET_KEY | |
unset AWS_SECURITY_TOKEN | |
unset AWS_SESSION_TOKEN | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment