Skip to content

Instantly share code, notes, and snippets.

View r115's full-sized avatar
:octocat:
🇰🇪

Bernard r115

:octocat:
🇰🇪
View GitHub Profile
@r115
r115 / aws.upload-folder-to-s3.js
Created May 13, 2020 12:47 — forked from jlouros/aws.upload-folder-to-s3.js
Upload folder to S3 (Node.JS)
const AWS = require("aws-sdk"); // from AWS SDK
const fs = require("fs"); // from node.js
const path = require("path"); // from node.js
// configuration
const config = {
s3BucketName: 'your.s3.bucket.name',
folderPath: '../dist' // path relative script's location
};
@r115
r115 / awsParamToEnv.sh
Last active March 21, 2024 15:51
Aws Parameter Store To System Environment Variable
aws ssm get-parameters-by-path \
--path /apps/prod --region us-east-1 \
| jq '.Parameters[] |.Name, .Value' \
| xargs -n2 -d'\n' | tr -s '[:blank:]' '=' \
| sed 's/"//g' \
| sed 's@.*/@@' \
| sed 's/^/export /' > \
| sudo tee /etc/profile.d/my_envs.sh