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

@aws-cdk/aws-rds

Package Overview
Dependencies
Maintainers
4
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-rds

CDK Constructs for AWS RDS

  • 0.9.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31K
increased by9.17%
Maintainers
4
Weekly downloads
 
Created
Source

AWS RDS Construct Library

The aws-cdk-rds package contains Constructs for setting up RDS instances.

Supported:

  • Clustered databases

Not supported:

  • Instance databases
  • Setting up from a snapshot

Starting a Clustered Database

To set up a clustered database (like Aurora), create an instance of DatabaseCluster. You must always launch a database in a VPC. Use the vpcPlacement attribute to control whether your instances will be launched privately or publicly:

const cluster = new DatabaseCluster(stack, 'Database', {
    engine: DatabaseClusterEngine.Aurora,
    masterUser: {
        username: 'admin',
        password: '7959866cacc02c2d243ecfe177464fe6',
    },
    instanceProps: {
        instanceType: new InstanceTypePair(InstanceClass.Burstable2, InstanceSize.Small),
        vpcPlacement: {
            subnetsToUse: ec2.SubnetType.Public,
        },
        vpc
    }
});

Your cluster will be empty by default. To add a default database upon construction, specify the defaultDatabaseName attribute.

Connecting

To control who can access the cluster, use the .connections attribute. RDS database have a default port, so you don't need to specify the port:

cluster.connections.allowFromAnyIpv4('Open to the world');

The endpoints to access your database will be available as the .clusterEndpoint and .readerEndpoint attributes:

const writeAddress = cluster.clusterEndpoint.socketAddress;   // "HOSTNAME:PORT"

Keywords

FAQs

Package last updated on 14 Sep 2018

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