AWS¶
Profile Switching¶
af — Interactive Profile Switcher¶
The primary way to switch AWS profiles:
- Presents all AWS profiles via fzf
- Exports
AWS_PROFILE - Checks if the session is valid (
sts get-caller-identity) - If expired, triggers
aws sso login - Displays account info on success
Quick Aliases¶
| Alias | Action |
|---|---|
av |
aws-vault |
avl |
aws-vault login (open console) |
ave |
aws-vault exec (run command with creds) |
afc |
Clear all AWS env vars |
afp |
Print current AWS profile |
AWS Vault¶
Credentials are managed via aws-vault with the macOS keychain backend:
CLI Aliases¶
Custom AWS CLI aliases are defined in ~/.aws/cli/alias:
Identity¶
Profile Switching¶
aws dev-profile # Set AWS_PROFILE=dev
aws prod-profile # Set AWS_PROFILE=prod
aws default-profile # Unset AWS_PROFILE
EKS¶
aws eks-list # List clusters in current region
aws eks-update <cluster> <region> <role> # Update kubeconfig
aws eks-config # Interactive configuration script
Role Assumption¶
aws assume-role <role> # Assume an IAM role
aws dai-dev # Shortcut: assume dev role
aws dai-dev-eks # Shortcut: assume dev EKS role
aws clear-creds # Clear cached credentials
EKS Configuration Script¶
The aws-eks-config.sh script provides interactive EKS cluster setup:
aws-eks-config.sh
aws-eks-config.sh -r eu-west-1 # Specify region
aws-eks-config.sh -R arn:aws:iam::123:role/Admin # With role
aws-eks-config.sh --role-lookup # Interactive role picker
aws-eks-config.sh -a my-cluster-alias # Custom context name
aws-eks-config.sh -l # List clusters only
Features:
- Interactive cluster selection with fzf
- Region configuration
- IAM role assumption
- Kubeconfig context aliasing
- Auth verification after configuration
IAM User Audit¶
Lists all IAM users with their access key IDs and last-used dates.
Max Pods Calculator¶
Calculates the maximum number of pods for an EKS node based on instance type, CNI version, and prefix delegation settings.