Created
June 11, 2020 18:15
-
-
Save blasterpal/29f56aa0150d1668d8cab61dcd89e8c6 to your computer and use it in GitHub Desktop.
Sandbox DocAPI Secrets test
This file contains hidden or 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
// NODE_ENV=production node inspect dist/server.js | |
var AWS = require('aws-sdk'); | |
var secretsmanager = new AWS.SecretsManager(); | |
console.log(secretsmanager.config); | |
var params = { | |
SecretId: process.env.DOCUMENT_API_KEY | |
}; | |
secretsmanager.getSecretValue(params, function(err, data) { | |
if (err) console.log(err, err.stack); // an error occurred | |
else console.log(data); // successful response | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment