Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-rds

Package Overview
Dependencies
Maintainers
5
Versions
467
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-rds

AWS SDK for JavaScript Rds Client for Node.js, Browser and React Native

  • 3.712.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
409K
increased by7.05%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/client-rds?

The @aws-sdk/client-rds package is part of the AWS SDK for JavaScript. It allows developers to interact with Amazon Relational Database Service (RDS) programmatically. This includes creating, managing, and deleting RDS instances, managing databases, and handling backups and snapshots.

What are @aws-sdk/client-rds's main functionalities?

CreateDBInstance

This feature allows you to create a new RDS instance. The code sample demonstrates how to create a MySQL database instance with specific parameters such as instance identifier, storage, instance class, engine type, and master username and password.

const { RDSClient, CreateDBInstanceCommand } = require('@aws-sdk/client-rds');

const client = new RDSClient({ region: 'us-west-2' });

const params = {
  DBInstanceIdentifier: 'mydbinstance',
  AllocatedStorage: 20,
  DBInstanceClass: 'db.t2.micro',
  Engine: 'mysql',
  MasterUsername: 'admin',
  MasterUserPassword: 'password123'
};

const run = async () => {
  try {
    const data = await client.send(new CreateDBInstanceCommand(params));
    console.log('DB Instance Created', data);
  } catch (err) {
    console.error(err);
  }
};

run();

DescribeDBInstances

This feature allows you to retrieve information about your RDS instances. The code sample demonstrates how to describe all RDS instances in a specific region.

const { RDSClient, DescribeDBInstancesCommand } = require('@aws-sdk/client-rds');

const client = new RDSClient({ region: 'us-west-2' });

const run = async () => {
  try {
    const data = await client.send(new DescribeDBInstancesCommand({}));
    console.log('DB Instances', data);
  } catch (err) {
    console.error(err);
  }
};

run();

DeleteDBInstance

This feature allows you to delete an existing RDS instance. The code sample demonstrates how to delete a database instance by specifying the instance identifier and skipping the final snapshot.

const { RDSClient, DeleteDBInstanceCommand } = require('@aws-sdk/client-rds');

const client = new RDSClient({ region: 'us-west-2' });

const params = {
  DBInstanceIdentifier: 'mydbinstance',
  SkipFinalSnapshot: true
};

const run = async () => {
  try {
    const data = await client.send(new DeleteDBInstanceCommand(params));
    console.log('DB Instance Deleted', data);
  } catch (err) {
    console.error(err);
  }
};

run();

Other packages similar to @aws-sdk/client-rds

FAQs

Package last updated on 13 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc