# aws-s3-async

> AWS S3 helper package for async

Latest version **1.0.4** (published 2019-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install aws-s3-async
pnpm add aws-s3-async
yarn add aws-s3-async
bun add aws-s3-async
```

## Health

**Score 25/100 (F)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-03-04 |
| First published | 2017-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yun Seok-Joon |
| Maintainers | yun.seok-joon |
| Keywords | aws-sdk |

## Links

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

## Dependencies (2)

- [rxjs](https://npm.io/package/rxjs.md) ^5.4.3
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.102.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2019-03-04
- 1.0.3 — 2017-08-26
- 1.0.2 — 2017-08-26
- 1.0.1 — 2017-08-26
- 1.0.0 — 2017-08-26

## README

# aws-s3-async

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/DevStarSJ/aws-s3-async/blob/master/LICENSE)

AWS S3 helper package for async. (callback-style functions to async functions)

I will add them one by one if necessary.
Not all features are implemented.
I will also provide additional convenience features.

## install

```
npm install aws-s3-async --save
```

## Implemented Features

- `getObjectAsync(params: GetObjectRequest, fileName: string): Promise<string>`

```TypeScript
const FILE_NAME = "/tmp/temp.jpg";
await getObjectAsync({Bucket: "BUCKET_NAME", Key: "KEY"}, FILE_NAME)
const image = fs.readfilesync(FILE_NAME);
```

- `putObjectAsync(params: PutObjectRequest, fileName: string)`

```TypeScript
const FILE_NAME = "/tmp/temp.jpg";
await putObjectAsync({Bucket: "BUCKET_NAME", Key: "KEY"}, FILE_NAME)
```

- `listObjectsAsync(params: ListObjectsRequest)`

```TypeScript
const params: ListObjectsRequest  = {Bucket: "BUCKET_NAME", Prefix: "PREFIX", Marker: "START_OBJECT"};
const result = await listObjectsAsync(params);
console.info(JSON.stringify(result, null, 2));
```

- `listAllKeysAsync(params: ListObjectsRequest): Promise<string[]>` : Promise style

```TypeScript
const result = await listAllKeysAsync({Bucket: "BUCKET_NAME", Prefix: "PREFIX"});
console.info(JSON.stringify(result, null, 2));
```

- `listAllKeysRx(params: ListObjectsRequest): Rx.Observable<any>` : ReactiveX style

```TypeScript
await listAllKeysRx({Bucket: "BUCKET_NAME", Prefix: "PREFIX"})
    .map(console.info)
    .toPromise();
```

- `listAllKeys(params:ListObjectsRequest , nextFunction: (data: any) => void)` : Callback style
```TypeScript
await listAllKeys({Bucket: "BUCKET_NAME", Prefix: "PREFIX"}, console.info);
```

## Author
[Yun.Seok-Joon](http://DevStarSJ.github.io)

## License
Toggler is available under the MIT license. See the LICENSE file for more info.

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