0.0.1 • Published 6 years ago

parse-s3-bucket-key v0.0.1

Weekly downloads
16
License
MIT
Repository
github
Last release
6 years ago

parse-s3-bucket-key

Build Status npm npm

Parse Bucket and Key from an S3 object link.

Installation

    npm install parse-s3-bucket-key

Usage

// It also supports "s3://" protocol: 's3://bucket-name/file/path/sample.json';
const {Bucket, Key} = parseS3BucketKey('https://s3.amazonaws.com/bucket-name/file/path/sample.json');

// Result:
{
    Bucket: 'bucket-name',
    Key: 'file/path/sample.json'
}