S3 sync with delete + excludes

Mirror dir to bucket; --delete removes stale keys. note: --size-only skips mtime checks

aws s3 sync ./ s3://<name>/ --delete --exclude '*.tmp' --exclude '.git/*' --size-only

tool
aws14 commands
tags
awsdiskcloud

More aws commands

  • aws s3 presign s3://<name>/path/file.tgz --expires-in 3600

    Generate a time-limited download URL without making the object public

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

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

  • 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

all 14 aws commands