How to use the RDS function from aws-sdk

Find comprehensive JavaScript aws-sdk.RDS code examples handpicked from public code repositorys.

62
63
64
65
66
67
68
69
70
71
/**
 *
 * @param {*} inputs
 */
async function selectCluster(inputs) {
  const RDS = new AWS.RDS();

  const describeDBClustersResult = await RDS.describeDBClusters().promise();
  const rawClusters = describeDBClustersResult.DBClusters;
  const clusters = new Map();
fork icon770
star icon0
watch icon2

20
21
22
23
24
25
26
27
28
29
 * is idempotent, but once a day is fine, that's how often backups are backed up.
 */
exports.handler = function (event, context, callback) {
    var test = event['test'] === true;

    var rds = new AWS.RDS();

    // Delete each of the snapshots in the list
    var deleteSnapshots = function (snapshots) {
        var snapshotCount = snapshots.length;
fork icon444
star icon2
watch icon2

14
15
16
17
18
19
20
21
22
23
  AutoMinorVersionUpgrade: true,
  ApplyImmediately: true

}

const RDS = new AWS.RDS({ region: event.region })

RDS.modifyDBInstance(params, function (err, result) {
  if (err) {
    console.log('Error', err)
fork icon55
star icon149
watch icon24

-1
fork icon3
star icon44
watch icon4

+ 17 other calls in file

29
30
31
32
33
34
35
36
37
38
beforeConnect: async (config) => {
  const isRds = host.includes('rds.amazonaws.com')

  let password = process.env.PGPASSWORD
  if (isRds && !password) {
    const signer = new AWS.RDS.Signer({
      region: process.env.AWS_REGION,
      hostname: process.env.PGHOST,
      port,
      username: process.env.PGUSER,
fork icon11
star icon13
watch icon0

54
55
56
57
58
59
60
61
62
63

AWS.config.update({
  region
})

var rds = new AWS.RDS({
  apiVersion: '2014-10-31'
})

var autoscaling = new AWS.AutoScaling()
fork icon0
star icon1
watch icon0

4
5
6
7
8
9
10
11
12
13
14
15
// Set the region 
AWS.config.update({region: 'ca-central-1'});


// Create RDS service object
// s3 = new AWS.S3({apiVersion: '2006-03-01'});
rds = new AWS.RDS({apiVersion: '2014-10-31'});


// Call S3 to list the buckets
// s3.listBuckets(function(err, data) {
//   if (err) {
fork icon0
star icon0
watch icon0