EC2 instances by tag as table aws
List running prod instances with id, private IP and AZ via JMESPath projection
aws ec2 describe-instances --filters Name=tag:Env,Values=prod Name=instance-state-name,Values=running --query 'Reservations[].Instances[].{id:InstanceId,ip:PrivateIpAddress,az:Placement.AvailabilityZone}' --output table
more aws
all 14 commands →
S3 sync with delete + excludes
aws s3 sync ./ s3://<name>/ --delete --exclude '*.tmp' --exclude '.git/*' --size-only
Presigned S3 download URL
aws s3 presign s3://<name>/path/file.tgz --expires-in 3600
Update kubeconfig for EKS
aws eks update-kubeconfig --name <cluster> --region <id> --alias <cluster> --kubeconfig ~/.kube/config
ECR docker login
aws ecr get-login-password --region <id> | docker login --username AWS --password-stdin <id>.dkr.ecr.<id>.amazonaws.com
SSM shell without SSH
aws ssm start-session --target i-<id> --region <id>