aws s3

S3 object storage commands

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
aws s3 sync <src> <dst> --dryrunPreview
aws s3api get-bucket-versioning --bucket <b>Check versioning
What it does

High-level S3 commands: ls, cp, mv, rm, sync, rb.

Common flags
FlagMeaning
lsList
cpCopy
syncSynchronise folders
rm --recursiveDelete many objects⚠ Irreversible without versioning.
--dryrun --dryrunShow what would happen
--delete --deleteRemove destination objects not in source⚠ Can wipe a bucket.
rb --forceRemove a bucket and contents⚠ Permanent.
Examples
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 →
Related
aws aws s3api
Open the full explainer →More in AWS, Azure & GCP CLIs

Reference text is hand-written and may be incomplete — check man aws for your version. Test destructive commands on a non-production system first.