Skip to main content

How to renew AWS SSO temporary credentials through CLI?

Run the following commands (from Ubuntu):

1. Add the following in ~/.aws/config file:

[profile sso]
sso_start_url = <SSO-Start-URL>
sso_region = <AWS-Region>
sso_account_id = <12-digit-AWS-Account-Number>
sso_role_name = <SSO-Role-Name>

2. Run the following command:

aws sso login --profile sso

3. You will be redirected to the browser --> Login --> Allow --> Close the browser

4. Install aws-sso-creds:

brew tap jaxxstorm/tap
brew install aws-sso-creds

5. Run the following command:

eval $(aws-sso-creds export --profile sso)

6. Check the current profile:

aws sts get-caller-identity

.

Comments

Popular posts from this blog

GoLang - How to check if key exists in map?

package main import "fmt" var m map[string]string func main() { m = make(map[string]string) m["foo"] = "abc" if val, ok := m["foo"]; ok { fmt.Println("foo found -", val) } else { fmt.Println("foo not found") } if val, ok := m["bar"]; ok { fmt.Println("bar found -", val) } else { fmt.Println("bar not found") } } Output: foo found - abc bar not found

How to delete commits in Git?

Suppose you have 3 commits with SHAs as follows: HEAD~0 --> Commit 3 ccccccc HEAD~1 --> Commit 2 bbbbbbb HEAD~2 --> Commit 1 aaaaaaa If you want to remove the last two commits (i.e., commits 2 and 3) and make Commit 1 as the latest commit, run the following commands: git reset --hard aaaaaaa git push origin HEAD --force Now, the commit history would be as follows: HEAD~0 --> Commit 1 aaaaaaa

How to install/upgrade/downgrade minikube in Linux (Ubuntu)?

To install the latest version: wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo cp minikube-linux-amd64 /usr/local/bin/minikube sudo chmod 755 /usr/local/bin/minikube minikube version To install a specific (v1.11.0) version: wget https://storage.googleapis.com/minikube/releases/v1.11.0/minikube-linux-amd64 sudo cp minikube-linux-amd64 /usr/local/bin/minikube sudo chmod 755 /usr/local/bin/minikube minikube version