Giter Club home page Giter Club logo

s3-directory-sync-cli's Introduction

DEPRECATED

This project has been deprecated and is no longer maintained in favor of projects like s3-sync-client which use the AWS CLI command directly. Comparatively, the linked project has much higher adoption and volume of maintainers / contributors. One reason for dropping support of this project is its major downfall in its lack of support for compression as noted in issue #12.

Please consider using s3-sync-client instead.

@foo-software/s3-directory-sync-cli

A CLI to sync a local directory with an AWS S3 bucket. Example usage could involve an automated deployment of a serverless web app. This command essentially uploads a folder to a bucket.

Install

For use within a project:

npm install @foo-software/s3-directory-sync-cli --save-dev

For global use:

npm install @foo-software/s3-directory-sync-cli -g

Usage

Command line:

s3-directory-sync \
  --S3_DIRECTORY_SYNC_ACCESS_KEY_ID abcdef \
  --S3_DIRECTORY_SYNC_BUCKET ghijkl \
  --S3_DIRECTORY_SYNC_LOCAL_DIRECTORY build \
  --S3_DIRECTORY_SYNC_SECRET_ACCESS_KEY mnopqr \
  /

In a project package.json (assuming environment variables like S3_DIRECTORY_SYNC_ACCESS_KEY_ID=abcdef):

{
  "scripts": {
    "deploy": "s3-directory-sync"
  }
}

Parameters

Parameters can either be passed in the command line as arguments or as environment variables.

Name Description Default
S3_DIRECTORY_SYNC_ACCESS_KEY_ID The AWS accessKeyId for an S3 bucket. --
S3_DIRECTORY_SYNC_BUCKET The AWS Bucket for an S3 bucket. --
S3_DIRECTORY_SYNC_DERIVE_CONTENT_TYPE If set to true will derive `Content-Type` metadata from file extension via mime-types false
S3_DIRECTORY_SYNC_SECRET_ACCESS_KEY The AWS secretAccessKey for an S3 bucket. --
S3_DIRECTORY_SYNC_LOCAL_DIRECTORY The local directory to sync (upload), relative to the directory of the command execution. --
S3_DIRECTORY_SYNC_PROGRESS If set to true the CLI will display a progress bar. Might be buggy in CI which justifies this option. false
S3_DIRECTORY_SYNC_REMOTE_DIRECTORY The directory of an S3 bucket to sync from a local directory. An empty string signifies the root. ''
S3_DIRECTORY_SYNC_REMOVE_HTML_EXTENSIONS If true HTML files will be uploaded with the `.html` extension omitted from the `Key`. This can be helpful if hosting an S3 website. false
S3_DIRECTORY_SYNC_REMOVE_HTML_EXTENSIONS_EXCLUDE An escape hatch to the above S3_DIRECTORY_SYNC_REMOVE_HTML_EXTENSIONS option. In the future, perhaps we could make this into a regex, but for now you can populate this value with a comma-separated list of paths relative to the local directory. Example static/html/iframe.html,static/html/iframe2.html (no glob pattern or dot prefix). ''
S3_DIRECTORY_SYNC_ACL The Access Control Policy as documented. public-read
S3_DIRECTORY_SYNC_STRICT Set to true if remote files that don't exist locally should be removed. false

Credits

This package was brought to you by Foo - a website quality monitoring tool. Automatically test and monitor website performance, SEO and accessibility with Lighthouse. Analyze historical records of Lighthouse tests with automated monitoring. Report with confidence about SEO and performance improvements to stay on top of changes when they happen!

s3-directory-sync-cli's People

Contributors

adamhenson avatar

Watchers

 avatar  avatar

s3-directory-sync-cli's Issues

thank you!

Hey I just wanted to let you know that this package works well for me. I'm using it in a ci job this way npx @foo-software/s3-directory-sync-cli

I'm looking for ways to invalidate the cloudfront cache but haven't found a package that works for that yet

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.