S3 object storage commands
high risk
aws s3 sync <src> <dst> --dryrunPreviewaws s3api get-bucket-versioning --bucket <b>Check versioningHigh-level S3 commands: ls, cp, mv, rm, sync, rb.
| Flag | Meaning |
|---|---|
ls | List |
cp | Copy |
sync | Synchronise folders |
rm --recursive | Delete many objects⚠ Irreversible without versioning. |
--dryrun --dryrun | Show what would happen |
--delete --delete | Remove destination objects not in source⚠ Can wipe a bucket. |
rb --force | Remove a bucket and contents⚠ Permanent. |
aws s3 ls s3://my-bucket --recursive --human-readable --summarizeSize of a bucket · explain & risk-check →aws s3 sync ./site s3://my-bucket --dryrunPreview a sync · explain & risk-check →Reference text is hand-written and may be incomplete — check man aws for your version. Test destructive commands on a non-production system first.