Giter Site home page Giter Site logo

s3-bulk-redirector's Introduction

S3 Bulk Redirector

NPM

Uses the x-amz-website-redirect-location to set bulk redirects for a given S3 bucket. Routing rules have a max limit whereas this does not.

Given a CSV file with the from and to redirect values comma separated (no header), it'll create S3 objects with the appropriate metadata so that they redirect properly when hitting those routes.

Install

npm install --save-dev s3-bulk-redirector

Usage

s3-bulk-redirector -c CSV_FILE -b BUCKET

If you use a named AWS Profile, prefix the command with AWS_PROFILE=X.

Options:

  • -c CSV file with from and to values to redirect. Required
  • -b S3 Bucket to add the redirects objects to. Required
  • -p Flag to set S3 Object ACL as private instead of public

Example CSV

/foo/,/bar/
/one,/two/place

Development

Use node version of 18+.

Setup

  • npm install

Commands

  • Run: ./s3-bulk-redirector.js with flags to test out
  • Test: npm run test or npm run test:watch

Changelog

1.1.5

  • Update dependencies

1.1.4

  • Update dependencies (commander to v9, csv-parse to 5)

1.1.3

  • Update dependencies (including commander to v7, changing options access flow)

1.1.2

  • Update dependencies

1.1.1

  • Update dependencies

1.1.0

  • Update dependencies
  • Add private flag (-p) to set private ACL for S3 objects

1.0.1

Update to push new README version

1.0.0

Initial release

s3-bulk-redirector's People

Contributors

dependabot[bot] avatar ssunday avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.