Skip to content

Instantly share code, notes, and snippets.

@joepie91
Last active January 11, 2021 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joepie91/2f554dc8d6d6ea9be6d394984a9b43d1 to your computer and use it in GitHub Desktop.
Save joepie91/2f554dc8d6d6ea9be6d394984a9b43d1 to your computer and use it in GitHub Desktop.
"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