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
# Main reference was lascarides' post at http://stackoverflow.com/questions/14743447/getting-pdf-from-wickedpdf-for-attachment-via-carrierwave | |
# estimate.rb | |
# ... | |
has_attached_file :pdf, | |
storage: :s3, | |
s3_credentials: { | |
access_key_id: ENV['AWS_ACCESS_KEY_ID'], | |
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], | |
bucket: ENV['AWS_BUCKET'] |
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 |