Update kubeconfig for EKS

Add/refresh an EKS context with a clean alias instead of the long ARN

aws eks update-kubeconfig --name <cluster> --region <id> --alias <cluster> --kubeconfig ~/.kube/config

tool
aws14 commands
tags
awsk8sgitops

More aws commands

  • aws ecr get-login-password --region <id> | docker login --username AWS --password-stdin <id>.dkr.ecr.<id>.amazonaws.com

    Auth Docker to ECR via stdin so the token never lands in shell history

  • aws ssm start-session --target i-<id> --region <id>

    Open an interactive shell on an instance with no open port 22 or bastion

  • aws logs tail /aws/lambda/<name> --follow --since 10m --format short

    Live-stream a log group like tail -f. modern: replaces clunky filter-log-events polling

  • aws iam simulate-principal-policy --policy-source-arn <id> --action-names s3:GetObject --resource-arns <id> --query 'EvaluationResults[].{action:EvalActionName,decision:EvalDecision}' --output table

    Test if a principal can do an action before granting; explains allow/deny

  • aws secretsmanager get-secret-value --secret-id <name> --query SecretString --output text | jq -r '.password'

    Fetch a JSON secret and extract one field. note: value appears in process args

all 14 aws commands