Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
AWS KMS code to decrypt the encrypted connection string
const kms = new AWS.KMS();
kms.decrypt({ CiphertextBlob: new Buffer(uri, 'base64') }, (err, data) => {
if (err) {
console.log('Decrypt error:', err);
return callback(err);
atlas_connection_uri = data.Plaintext.toString('ascii');
processEvent(event, context, callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment