aws-s3-sync Verified for current stable LTS

Aws S3 Sync Command: Sync Buckets With Delete

An engineer would use the 'aws s3 sync' command with the --delete option to ensure that the contents of one S3 bucket mirror another by copying new and modified files while removing files in the target bucket that no longer exist in the source bucket. Exact CLI syntax to sync buckets with delete using Aws S3 Sync.

When to use this: An engineer would use the 'aws s3 sync' command with the --delete option to ensure that the contents of one S3 bucket mirror another by copying new and modified files while removing files in the target bucket that no longer exist in the source bucket.
Destructive Command Warning

Destructive operation. Confirm the target path and keep a backup before executing.

Command Syntax

aws s3 sync s3://<bucket_source_name>/<path/to/remote_location> s3://<bucket_target_name>/<path/to/remote_location> --delete

Command Breakdown

--delete
Command Option
Tool-specific option used by this command invocation.

FAQ

Purpose: Exact syntax to sync buckets with delete using Aws S3 Sync.

Test path: Replace placeholders and run destructive commands in a disposable workspace first.

Flag behavior: Tool version, platform, and shell can change behavior.

Improve This Command

Suggest a correction, safer default, or version-specific note for this entry.

Related Operations

Back to Aws S3 Sync directory