Last active
January 11, 2021 10:10
-
-
Save joepie91/2f554dc8d6d6ea9be6d394984a9b43d1 to your computer and use it in GitHub Desktop.
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
"use strict"; | |
const Promise = require("bluebird"); | |
const AWS = require("aws-sdk"); | |
AWS.config.update({ region: "eu-central-1" }); | |
module.exports = function createRDSInstance(identifier) { | |
let rds = new AWS.RDS(); | |
return Promise.try(() => { | |
return rds.describeDBInstances({DBInstanceIdentifier: self.identifer}).promise(); | |
}).then((response) => { | |
return { | |
rds: rds, | |
identifier: identifier, | |
instance: response.DBInstances[0], | |
otherMethod: function(whatever) { | |
return stuff; | |
} | |
}; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment