@chunkd/fs-aws
TypeScript icon, indicating that this package has built-in type declarations

11.2.2 • Public • Published

@chunkd/fs-aws

File system abstraction for AWS S3 using @aws-sdk/client-s3

see @chunkd/fs for more usage

Usage

import { FsAwsS3 } from '@chunkd/fs-aws';
import S3Client from '@aws-sdk/clients-s3';

const fsS3 = new FsAwsS3(new S3Client());

// Read in the first 1KB of data

for await (const url of fsS3.list(new URL("s3://foo/bar/baz")) {
    // files
}

// Stream a file from one bucket to another
await fsS3.write(new URL("s3://foo/bar/baz.txt"), fsS3.readStream(new URL("s3://bar/baz.txt")))

Readme

Keywords

none

Package Sidebar

Install

npm i @chunkd/fs-aws

Weekly Downloads

80

Version

11.2.2

License

MIT

Unpacked Size

37 kB

Total Files

16

Last publish

Collaborators

  • blacha