Socket
Book a DemoInstallSign in
Socket

@nrfcloud/s3-sync-dir

Package Overview
Dependencies
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nrfcloud/s3-sync-dir

Utility to sync local dir to s3 bucket

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
7
Created
Source

s3-sync-dir

Utility script to automate syncing a local dir to an s3 bucket

Usage

By default this script walks the user through the decisions to create a release. It also has an option to send in all the options at once (no prompt). The following is an example of the available options. You can get this output by running npx s3-sync-dir --help.

Usage: index.ts [options]

Options:
  -k, --access-key-id <accessKeyId>          AWS Access Key ID
  -s, --secret-access-key <secretAccessKey>  AWS Access Key Secret
  -r, --region <region>                      AWS Region
  -b, --bucket <bucket>                      S3 Bucket
  -d, --dir-to-sync <dirToSync>              Dir to Sync
  -p, --basePath <path>                      Base path for directory
  -g, --debug                                Debug
  -h, --help                                 output usage information

# example
npx s3-sync-dir -d "local-dir" -b "s3-bucket" -p "/absolute/base/path (optional)"

Configuration

This script automatically looks for a .env file at the project root. The repo includes a .env.sample file. To use with your project, run cp node_modules/s3-sync-dir/.env.sample ./.env. The file includes the following config variables:

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=

The script will fall back to the variables defined in the .env file, if not passed in explicitly as arguments.

Gotchas

The S3 bucket must be already created and grant write permissions to the owner of the AWS credentials.

Keywords

s3

FAQs

Package last updated on 12 Jul 2019

Did you know?

Socket

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