---
title: "createS3FileStorage"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/file-storage-s3/src/lib/s3.ts#L80"
---

# createS3FileStorage

## Summary

Creates an S3-backed implementation of `FileStorage`.

This works with AWS S3 and S3-compatible providers (for example MinIO or LocalStack) by
overriding the `endpoint` option.

`set()` streams files to S3. Files larger than `partSize` are sent with a multipart upload, so
only about two parts are held in memory at a time. `put()` uses the same upload path but keeps the
whole file in memory, because it returns a `File` with the stored contents.

## Signature

```ts
function createS3FileStorage(options: S3FileStorageOptions): FileStorage<File>

```

## Parameters

### `options`

Configuration for the S3 backend

## Returns

A `FileStorage` implementation backed by S3