# loopback4-s3

> A loopback-next extension for AWS S3 integration.

Latest version **11.0.0** (published 2026-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install loopback4-s3
pnpm add loopback4-s3
yarn add loopback4-s3
bun add loopback4-s3
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 11.0.0 |
| Published | 2026-06-16 |
| First published | 2020-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 22 \|\| 24 |
| Dependencies | 9 |
| Unpacked size | 33.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 31 |
| Author | Sourcefuse |
| Maintainers | samarpan_sf, yeshasf, shubhamp-sf, abir.ganguly |
| Keywords | loopback-extension, loopback |

## Links

- npm: https://www.npmjs.com/package/loopback4-s3
- Repository: https://github.com/sourcefuse/loopback4-s3
- Homepage: https://github.com/sourcefuse/loopback4-s3#readme
- Issues: https://github.com/sourcefuse/loopback4-s3/issues
- npm.io page: https://npm.io/package/loopback4-s3

## Dependencies (9)

- [@smithy/types](https://npm.io/package/@smithy/types.md) ^4.14.0
- [@aws-sdk/types](https://npm.io/package/@aws-sdk/types.md) ^3.973.7
- [@loopback/boot](https://npm.io/package/@loopback/boot.md) ^8.0.12
- [@loopback/core](https://npm.io/package/@loopback/core.md) ^7.0.11
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.6.1
- [@loopback/context](https://npm.io/package/@loopback/context.md) ^8.0.11
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.1030.0
- [@smithy/smithy-client](https://npm.io/package/@smithy/smithy-client.md) ^4.12.9
- [@aws-sdk/s3-request-presigner](https://npm.io/package/@aws-sdk/s3-request-presigner.md) ^3.1030.0

## Recent versions

- 11.0.0 (latest) — 2026-06-16
- 10.1.0 — 2026-04-21
- 10.0.0 — 2025-09-08
- 9.0.3 — 2024-12-18
- 9.0.2 — 2024-06-04
- 9.0.1 — 2024-05-15
- 9.0.0 — 2024-03-13
- 8.0.1 — 2024-01-18
- 8.0.0 — 2023-10-04
- 7.0.1 — 2023-07-14
- 7.0.0 — 2023-06-07
- 6.1.3 — 2023-04-24
- 6.1.2 — 2023-03-13
- 6.1.1 — 2023-02-20
- 6.1.0 — 2023-01-11
- … 32 more at https://npm.io/package/loopback4-s3/versions

## README

<a href="https://sourcefuse.github.io/arc-docs/arc-api-docs" target="_blank"><img src="https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/docs/assets/logo-dark-bg.png?raw=true" alt="ARC By SourceFuse logo" title="ARC By SourceFuse" align="right" width="150" /></a>

# [loopback4-s3](https://github.com/sourcefuse/loopback4-s3)

<p align="left">
<a href="https://www.npmjs.com/package/loopback4-s3">
<img src="https://img.shields.io/npm/v/loopback4-s3.svg" alt="npm version" />
</a>
<a href="https://sonarcloud.io/summary/new_code?id=sourcefuse_loopback4-s3" target="_blank">
<img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/sourcefuse_loopback4-s3?server=https%3A%2F%2Fsonarcloud.io">
</a>
<a href="https://github.com/sourcefuse/loopback4-s3/graphs/contributors" target="_blank">
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/sourcefuse/loopback4-s3">
</a>
<a href="https://www.npmjs.com/package/loopback4-s3" target="_blank">
<img alt="downloads" src="https://img.shields.io/npm/dw/loopback4-s3.svg">
</a>
<a href="https://github.com/sourcefuse/loopback4-s3/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/sourcefuse/loopback4-s3.svg" alt="License" />
</a>
<a href="https://loopback.io/" target="_blank">
<img alt="Powered By LoopBack 4" src="https://img.shields.io/badge/Powered%20by-LoopBack 4-brightgreen" />
</a>
</p>

## Overview

A simple loopback-next extension for AWS S3 integration in loopback applications.

## Install

```sh
npm install loopback4-s3
```

## Usage

In order to use this component into your LoopBack application, please follow below steps.

- Add component to application and provide access keys and other s3 initialization configuration details via AWSS3Bindings.Config binding as mentioned below. You can add any of the options mentioned [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#constructor-property).

```ts
this.bind(AWSS3Bindings.Config).to({
  accessKeyId: process.env.AWS_ACCESS_KEY_ID,
  secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
  region: process.env.AWS_REGION,
} as AwsS3Config);
this.component(AwsS3Component);
```

- After this, you can just inject the S3 provider across application.

```ts
import {S3WithSigner} from 'loopback4-s3';

@inject(AWSS3Bindings.AwsS3Provider) s3: S3WithSigner,
```

## Migration to a version after 4.0.0

`loopback4-s3@4.0.0` is the last version that would be using aws-sdk v2, after that all the versions are going to be based on [`aws-sdk v3`](https://github.com/aws/aws-sdk-js-v3).

You should remove any previous installation of `aws-sdk` from your projects if you have it installed just for `loopback4-s3`.

The client from v3 sdk no longer require the `.promise()` method to return a promise -

```
const data =  await v2client.command(params).promise() // in v2

const data = await v3client.command(params) // v3
```

The client provided by the `loopback4-s3` package extends `S3` class and not `S3Client`, so you do not need to create commands to use this module.

You can read [this](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/migrating-to-v3.html) guide to know more about migrating your code to `aws-sdk-js-v3`.

The `getPresignedUrl` method is also missing in `aws-sdk/client-s3` client, so it is provided in the extended client returned by the provider. The documentation for this new `getPresignedUrl` are provided [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/modules/_aws_sdk_s3_request_presigner.html)

You might also have to install `cmake 3.1+` on your machine if [`aws-crt`](https://www.npmjs.com/package/aws-crt) is not available as a prebuild package for your system.

## Feedback

If you've noticed a bug or have a question or have a feature request, [search the issue tracker](https://github.com/sourcefuse/loopback4-s3/issues) to see if someone else in the community has already created a ticket.
If not, go ahead and [make one](https://github.com/sourcefuse/loopback4-s3/issues/new/choose)!
All feature requests are welcome. Implementation time may vary. Feel free to contribute the same, if you can.
If you think this extension is useful, please [star](https://help.github.com/en/articles/about-stars) it. Appreciation really helps in keeping this project alive.

## Contributing

Please read [CONTRIBUTING.md](https://github.com/sourcefuse/loopback4-s3/blob/master/.github/CONTRIBUTING.md) for details on the process for submitting pull requests to us.

## Developing

For development guidelines, refer [here](https://github.com/sourcefuse/rakuten-pms-api/tree/master/DEVELOPING.md)

## Code of conduct

Code of conduct guidelines [here](https://github.com/sourcefuse/loopback4-s3/blob/master/.github/CODE_OF_CONDUCT.md).

## License

[MIT](https://github.com/sourcefuse/loopback4-s3/blob/master/LICENSE)

---
_Source: https://npm.io/package/loopback4-s3 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
