Skip to content

Commit

Permalink
Error if credentials set in terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson committed Dec 3, 2024
1 parent e1733e2 commit 4d01ba6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lab/bin/reset-environment
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

if [ ! -z "${AWS_ACCESS_KEY_ID}" ]; then
echo "Error: You have AWS credentials set in this terminal"
echo "This IDE is configured to use an IAM instance profile with the appropriate permissions"
echo ""
echo "Please close this terminal and open a new one, do not set AWS_ACCESS_KEY_ID or any related variables"
exit 1
fi

# Make sure we run from a consistent directory
cd ~

Expand Down

0 comments on commit 4d01ba6

Please sign in to comment.