Skip to content

Instantly share code, notes, and snippets.

@sinkovsky
Created August 22, 2018 14:38
Show Gist options
  • Save sinkovsky/0a2ff8c3bf27d7c1ec063f8af6246bdb to your computer and use it in GitHub Desktop.
Save sinkovsky/0a2ff8c3bf27d7c1ec063f8af6246bdb to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ -z $1 ]]
then
echo "Usage: $0 <env>"
echo ""
echo "Allowed env values: p1, d1, sl-loki, sl-cdfw"
echo ""
elif [[ "$1" = "p1" ]]
then
sl aws session generate --profile p1 --role-name engineer --account-id 067346688434 --region eu-west-2
elif [[ "$1" = "d1" ]]
then
sl aws session generate --profile d1 --account-id 522072180890 --role-name engineer --region=us-east-1
elif [[ "$1" = "sl-loki" ]]
then
sl aws session generate --profile sl-loki --account-id 795239096644 --role-name owner --region=eu-west-1
elif [[ "$1" = "sl-cdfw" ]]
then
sl aws session generate --profile sl-cdfw --account-id 639866701503 --role-name owner --region-eu-west-1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment