A Go implementation of snap-to-s3 - Upload EBS snapshots to Amazon S3.
This is a complete rewrite of the original Node.js snap-to-s3 tool in Go, providing:
- EBS Snapshot Migration: Create temporary volumes from snapshots, compress them, and upload to S3
- Validation: Verify uploaded snapshots against original EBS snapshots
- Compression: Support for LZ4 and ZSTD compression
- Encryption: Optional GPG encryption and AWS SSE support
- Flexible Volume Types: Auto-select volume types (gp3 for ≤126GB, st1 for larger)
- ✅ Migrate EBS snapshots to S3
- ✅ Validate uploaded snapshots
- ✅ LZ4 and ZSTD compression
- ✅ Server-side encryption (AES256, aws:kms)
- ✅ GPG encryption support
- ✅ Automatic volume type selection
- ✅ Tag-based snapshot management
- ✅ Concurrent upload streams
go build -o go-snap-to-s3Migrate all snapshots tagged for migration:
./go-snap-to-s3 migrate --bucket my-bucket --allMigrate one snapshot:
./go-snap-to-s3 migrate --bucket my-bucket --oneMigrate specific snapshots:
./go-snap-to-s3 migrate --bucket my-bucket --snapshots snap-12345,snap-67890Validate all migrated snapshots:
./go-snap-to-s3 validate --bucket my-bucket --all--tag: Tag name for marking snapshots (default: "snap-to-s3")--bucket: S3 bucket to upload to (required)--mount-point: Temporary mount point (default: "/mnt")--volume-type: Volume type (auto, gp3, gp2, st1, standard)--compression: Compression type (lz4 or zstd)--compression-level: Compression level (1-9 for lz4, 1-19 for zstd)--upload-streams: Number of concurrent upload streams--dd: Use dd for raw disk image instead of tar--sse: Server-side encryption (AES256 or aws:kms)--gpg-recipient: GPG recipient for encryption--keep-temp-volumes: Don't delete temporary volumes
- Go 1.21 or later
- AWS credentials configured
- Running on an EC2 instance
- Required system utilities: lsblk, tar, mount, umount, lz4/zstd
This Go implementation provides:
- Better performance and lower memory usage
- Native concurrency support
- Simpler deployment (single binary)
- Type safety and better error handling
0BSD - Same as the original snap-to-s3 project