S3 KMS
Download all objects in a given S3 bucket recursively and save them locally, maintain directory structure. Encrypt all downloaded objects using KMS with a user-defined CMK and upload them to a second S3 bucket.
Install packages
npm i
Run Linting
npm run lint
npm run lint:fix
Run Tests
npm run test
npm run test:integration
/localstack/scripts/setup.sh
for bootstrapdocker
is running on your local machine before spinning up localstacknpm run start:infra
Destroys the local AWS infrastructure
npm run destroy:infra
npm run start:download
npm run start:upload
.env.sample
to .env
for configurationlocalstack/sample/*
to S3.tmp/*
localstack/scripts/setup.sh
comprises of the bootstrap script to run aws cli (Note: KMS is not supported in localstack) aws kms create-key --region us-west-2 --policy file://kms-policy.json
aws --region=us-west-2 --endpoint-url=http://localstack:4572 s3api put-bucket-encryption --bucket encrypted-bucket --server-side-encryption-confi
These tests have been ran and reported on Mac OSX v10.14.5 15 inch 2.8 GHz Intel Core i7
====================== sortBy ======================
Slow Promise.all 31 ms/op 3 samples
Promise.map(3) 29.29 ms/op 3 samples
Fast Promise.map(Infinity) 27.34 ms/op 3 samples
====================== sortBy ======================
Slow Promise.map(Infinity) 29.06 ms/op 6 samples
Promise.map(10) 28.40 ms/op 6 samples
Fast Promise.map(3) 26.91 ms/op 6 samples