This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let plainTextEmailAddress = null | |
let cloudFrontPrivateKey = null | |
const KMS = require('aws-sdk/clients/kms') | |
const kms = new KMS({apiVersion: '2014-11-01'}) // <==== TODO: CHECK TO SEE IF apiVersion is correct!!!!!!!!!!!! | |
const crypto = require('crypto') | |
const headers = { | |
"Content-Type": "application/json", | |
"Access-Control-Allow-Headers": "Content-Type", | |
"Access-Control-Allow-Methods": "OPTIONS,POST", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* AWS Sdk KMS spike: (assuming node v6.6+) | |
* 1 - Create master key at KMS | |
* 2 - Copy alias or ARN | |
* 3 - run this i.e. | |
* $ node spike.js KEY_ALIAS YOUR_PLAINTEXT_TO_ENCRYPT | |
*/ | |
const AWS = require('aws-sdk'); | |
// aws-sdk is not reading my region info so i'll have to set it here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
logger: process.stdout, | |
region: 'ap-northeast-1' | |
}); | |
var r53 = new AWS.Route53(); | |
var params = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const fs = require('fs'); | |
const path = require('path'); | |
//configuring the AWS environment | |
AWS.config.update({ | |
accessKeyId: "AWS_ACCESS_KEY", | |
secretAccessKey: "AWS_SECRET_ACCESS_KEY" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
height: 100%; | |
padding: 0; | |
margin: 0; | |
} | |
#chart { | |
height: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const aws = require('aws-sdk') | |
module.exports = { | |
setupAWS: () => { | |
aws.config.update( | |
process.env.NODE_ENV === 'test' | |
? { | |
endpoint: `http://localhost:${process.env.DYNAMO_TESTING_PORT}`, | |
region: 'mock', | |
credentials: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AWS Cloud9 settings | |
## Prepare | |
### AWS SSM | |
Push the your environment variables. | |
- FYI | |
- Like a [12 factor app](https://12factor.net/config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to upload file to s3 bucket. | |
var AWS = require('aws-sdk'); | |
AWS.config = new AWS.Config(); | |
AWS.config.accessKeyId = "XXX"; | |
AWS.config.secretAccessKey = "XXXXX"; | |
AWS.config.region = "ap-south-1"; | |
var s3 = new AWS.S3(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require("aws-sdk"); | |
const medialive = new AWS.MediaLive({ | |
region: "ap-northeast-1" | |
}); | |
const mediapackage = new AWS.MediaPackage({ | |
region: "ap-northeast-1" | |
}); | |
const mediastore = new AWS.MediaStore({ | |
region: "ap-northeast-1" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const AWS = require('aws-sdk'), | |
nConf = require('nconf'); | |
let S3 = null; | |
function deploy(fileName, fileContent) { | |
return new Promise((resolve, reject) => { | |
const expireDate = new Date(); |
OlderNewer