# s3-list-all

> get full list response from s3.

Latest version **1.0.0** (published 2017-06-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install s3-list-all
pnpm add s3-list-all
yarn add s3-list-all
bun add s3-list-all
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-06-10 |
| First published | 2017-06-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ryan Day |
| Maintainers | soldair |
| Keywords | s3, list, knox, aws, aws-adk, v2 |

## Links

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

## Dependencies (1)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.67.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.0 (latest) — 2017-06-10

## README

# s3-list-all
get full list response from s3.
s3 limits listObjects responses to 1000 entries. you have to recursively call listObjects with the continuation token to get the whole result.

```js
const listAll = require('s3-list-all')({accessKeyId:key,secretAccessKey:secret})

listAll({Bucket:bucket,Prefix:'2017-'},function(err,results){
  // if any requests error we callback with err and undefined result.

  console.log(results)
  console.log(results.length)

  //results is an array of all s3 response.Contents
  /*
  [  
  { Key: '2017-01-01T07:00:00.000.log',
    LastModified: 2017-01-01T07:00:02.000Z,
    ETag: '"0000000000000000000000000000000000-37"',
    Size: 194034009,
    StorageClass: 'STANDARD' },
    ...
  ]
  */
})

```

## api

- require('s3-list-all')(awsConfig) , default export.
  - pass a config object with at least aws accessKeyId and secretAccessKey. valid config options are in the aws-sdk documentation here.
  - returns function `listAll`
- listAll(s3Config,cb)
  - s3 config options are here is the aws documentation. http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html

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