Socket
Socket
Sign inDemoInstall

s3-url-parser

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    s3-url-parser

Parse aws S3 urls. Extract region, bucket name, object key.


Version published
Weekly downloads
3.4K
increased by9.65%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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'
 */

Keywords

FAQs

Last updated on 29 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc