Migrate Supabase Storage to S3 without breaking images, permissions, or URLs

Published on 2026-11-14 by frfrand

Practical plan for migrating files from Supabase Storage to S3 with inventory, keys, policies, URLs, validation, and rollback.

Migrate Supabase Storage to S3 without breaking images, permissions, or URLs

Moving Supabase Storage files to an S3-compatible service is more than copying objects. If your application depends on public URLs, signed links, per-user permissions, or bucket metadata, a hasty change can leave broken images and private files accessible.

1. Before copying, inventory actual usage

Document each bucket, its visibility, object names, number of files, total size, and formats. Look for where paths are stored: SQL columns, API responses, email templates, and caches. Note which files are downloaded with signed URLs, which users can upload them, and which flows need to delete or replace objects.

2. Map Supabase security to S3

In Supabase Storage, rules can rely on project authorization policies. In S3 you will need to define bucket permissions, IAM policies, API validation, and eventually prefixed URLs. Do not simply copy public permissions: review authentication cases and separation between organizations.

ElementBeforeAfter
BucketPublic or privateExplicit S3 provider policy
PathSupabase object keyS3 object key
URLSupabase domain and APIS3 domain/CDN/proxy
Temporary accessSigned URLExpiring presigned URL
AuditingSupabase logsProvider and application logs

3. Design the keys and URL strategy

Avoid using absolute URLs as permanent identifiers in the database. Instead, save a stable key, for example tenant_42/avatar/abc.webp, and generate the URL from the API based on the active provider. If you have already saved complete URLs, prepare a replacement mapping and temporary compatibility through redirects or proxy, respecting privacy.

4. Copy and verify

Use a tool or script that can list objects from the source in an authorized manner and upload them to the destination while preserving MIME type, size, necessary metadata, and valid names. Do not assume that the ETag is always an MD5 hash: multipart uploads and provider configurations can produce different values.

Verify object count, total bytes, hashes calculated when downloading samples or the entire set when viable, and accessibility. Check files with spaces, special characters, and deep paths. Define an exception report for each failed object.

5. Prevent write loss during the switch

Options: temporarily stop uploads, enable dual writes with reconciliation, or maintain an incremental synchronization period. Choose according to volume and downtime tolerance. Do not change reads until validating the new URLs with a test version of the frontend.

After the change, monitor 403, 404, response size, and load error rate. Keep a plan to revert to the origin during the transition period.

6. Don't forget costs and retention

Include storage, PUT/GET requests, network egress, CDN, backups, support, and possible inter-region transfer billing. Confirm encryption and retention with your provider; S3 compatible does not mean they all implement exactly the same features.

Check migrate data and services from Lovable Cloud, what is Supabase and the ArduMaker services.

Frequently asked questions

### Can I copy files without touching my frontend? Only if you maintain a compatibility layer for URLs and permissions.

Does S3 have the same policies as Supabase?

No. You must reproduce the relevant rules with policies and backend logic.

Is it safe to delete the original bucket right away?

Not before validating the migration, link expiration, copies, and rollback.

References: Supabase Storage and Amazon S3.

  • Supabase
  • S3
  • migración
  • storage
  • seguridad

Keep reading

All articles · VPS plans