1.0.3 • Published 3 years ago

s3-url-parser v1.0.3

Weekly downloads
122
License
MIT
Repository
github
Last release
3 years ago

S3 URL PARSER

This library helps you extract the following information from S3 urls of any format:

  • bucket name
  • region
  • key

Formats:

Usage

import s3ParseUrl from 's3-url-parser';

const sampleUrl = 'http://my-bucket.s3.us-west-2.amazonaws.com/key-to-my-s3-object';
const { bucket, region, key } = s3ParseUrl(sampleUrl);

/*
  bucket = 'my-bucket'
  region = 'us-west-2'
  key = 'key-to-my-s3-object'
 */