Skip to content
Back to skills

S3 Sync

ASecurity

You can use this to synchronize a local directory to an S3 bucket with built-in safeguards against accidental deletion of remote objects. Use when deploying static assets or performing bulk uploads to cloud storage with confidence in data safety.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
ai-agentsbashnodeawsgitperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add shahshrey/skill-trainer --skill s3-sync --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of S3 Sync?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for S3 Sync
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shahshrey-s3-sync/badge)](https://www.skillsdirectory.com/skills/shahshrey-s3-sync)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: s3-sync
description: You can use this to synchronize a local directory to an S3 bucket with built-in safeguards against accidental deletion of remote objects. Use when deploying static assets or performing bulk uploads to cloud storage with confidence in data safety.
---

## Overview

Syncing to S3 requires careful handling to prevent accidental data loss. This skill covers syncing strategies that protect against destructive operations while maintaining high throughput and efficient incremental uploads.

## Core Concepts

S3 sync operations compare local and remote state, then copy differences to the bucket. The key risk is the `--delete` flag, which removes remote objects that no longer exist locally. Safe syncing requires understanding:

- Comparing file modification times and ETags
- Excluding sensitive files from sync
- Validating deletions before applying them
- Dry-run mode for previewing changes

## Safe Sync Pattern

Always use `--dryrun` first to preview changes:

```bash
aws s3 sync ./build/ s3://my-bucket/assets/ \
  --dryrun \
  --exclude "*.map" \
  --exclude ".git/*"
```

Then apply the sync without the `--dryrun` flag:

```bash
aws s3 sync ./build/ s3://my-bucket/assets/ \
  --exclude "*.map" \
  --exclude ".git/*" \
  --delete
```

## Performance Tuning

For large uploads, increase parallelism:

```bash
aws configure set default.s3.max_concurrent_requests 23
aws configure set default.s3.max_bandwidth 100MB/s
```

## Excluding Files

Create a `.s3exclude` file to skip files during sync:

```
.git
*.tmp
node_modules/
.env
.env.local
```

Then use in your sync command:

```bash
aws s3 sync ./dist/ s3://bucket/ --exclude-from .s3exclude
```

## Monitoring

Check upload progress in real time:

```bash
aws s3 sync ./large-files/ s3://bucket/ --profile prod --verbose
```

## Checklist

- [ ] Dry-run validates expected changes
- [ ] Sensitive files are properly excluded
- [ ] S3 bucket has versioning enabled
- [ ] Sync excludes development artifacts
- [ ] Bandwidth and concurrency configured
- [ ] Team is aware of sync schedule

Files in this skill

  • README.md409 B
  • SKILL.md2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.