Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

Security

Client-side encryption for S3: protect object contents before upload

Published August 2026 · 8 min read

TLS protects object data in transit and a provider can encrypt storage at rest, but some workloads need encryption before bytes leave the application. Client-side encryption gives the application control of the encryption keys—and responsibility for never losing them.

Encrypt before the S3 request

The application transforms plaintext into ciphertext locally and uploads the ciphertext object. The storage provider stores bytes that cannot be interpreted without the application-held key material.

This can reduce exposure to a storage-layer credential compromise, but object sizes, names and some metadata may still reveal operational information unless they are designed carefully.

Keep encryption keys separate from S3 keys

The S3 access key controls whether an actor can read or write objects. The encryption key controls whether ciphertext can become plaintext. Storing both in the same unprotected file removes much of the benefit of separating them.

Use a key-management or secret-recovery process that survives loss of the original application host.

Design metadata for decryption

The restore process may need algorithm identifiers, key versions, nonces or envelope-encryption metadata. Store enough information to decrypt later without exposing the actual key.

Version the encryption format so future software can distinguish older objects across encryption-format changes.

Plan rotation differently from S3 credential rotation

Changing an S3 access key does not require rewriting stored objects. Rotating an encryption key may require envelope-key updates or object re-encryption depending on the design.

Keep those procedures separate so routine storage credential rotation does not accidentally trigger a multi-terabyte rewrite.

Prove recovery on another machine

Download a test object using a fresh S3 credential on an isolated system, retrieve the encryption key through the documented recovery path and decrypt the expected content.

That test demonstrates that the organization—not just one running application process—can recover the protected data.

Next step

Understand client-side S3 encryption, key separation, metadata, restore requirements and the tradeoff between provider-readable objects and application-controlled ciphertext.

Explore DotMoose Object Storage

Keep reading

Related guides.

boto3 S3-compatible storage: custom endpoint, put_object and connection tests

Connect boto3 to S3-compatible storage with endpoint_url. Start with a read-only list, then optionally verify put_object with one isolated write/read/delete round trip.

Read the guide

S3 multipart upload explained: part size, retries, checksums and cleanup

Learn how S3 multipart upload works: numbered parts, AWS part-size limits, parallel retries, completion, checksums and cleanup of abandoned uploads.

Read the guide

S3 presigned URLs explained: temporary access without sharing keys

Learn how S3 presigned URLs authorize a specific operation for a limited time, where they help, what they expose and how to use them safely.

Read the guide

More object storage guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move