Skip to content

Instantly share code, notes, and snippets.

@chtz
chtz / serverless-create-node.sh
Created May 11, 2020 07:08
serverless.com create node project
sls create --template aws-nodejs --path <path>
@chtz
chtz / serverless-config-from-stage-file.yml
Created May 11, 2020 07:11
serverless.com config value from stage file
${file(config.${self:provider.stage}.yml):foo}
@chtz
chtz / node-sha256-hex.js
Created May 11, 2020 07:13
node sha256 as hex string
//npm install hash.js
const hash = require('hash.js')
hash.sha256().update(foo).digest('hex')
@chtz
chtz / aws-route53-changeResourceRecordSets.js
Last active May 11, 2020 07:19
AWS SDK JavaScript update A Record in Route53
const AWS = require('aws-sdk');
const route53 = new AWS.Route53();
await route53.changeResourceRecordSets({
ChangeBatch: {
Changes: [
{
Action: "UPSERT",
ResourceRecordSet: {
Name: domain,
ResourceRecords: [