Skip to main content

A construct for working with RDS SQL servers

Project description

RDS Tools

---

cdk-constructs: Developer Preview

The APIs of higher level constructs in this module are in developer preview before they become stable. We will only make breaking changes to address unforeseen API issues. Therefore, these APIs are not subject to Semantic Versioning, and breaking changes will be announced in release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


There are multiple versions of this library published. You should be using the v0.X.X versions for now. There are versions published that match the CDK version they depend on, but don't use those.

This is a collection of CDK constructs you can use with RDS.

Developer Preview

DatabaseScript

Provides a Custom Resource and backing Lambda Function that will run a given script against a given database.

const databaseInstance = new DatabaseInstance(stack, 'test-database', {
  engine: DatabaseInstanceEngine.sqlServerWeb({ version: SqlServerEngineVersion.VER_15_00_4043_16_V1 }),
  vpc: vpc,
});


// ...


new DatabaseScript(stack2, 'test', {
  databaseInstance,
  script: 'SELECT 1',
})
  .bind(databaseInstance.connections.securityGroups[0]); // bind for security access

DatabaseUser

There was once a construct called DatabaseUser. However, it is better to use the standard code from the CDK directly:

const myUserSecret = new rds.DatabaseSecret(this, 'MyUserSecret', {
  username: 'myuser',
  masterSecret: instance.secret,
  excludeCharacters: '{}[]()\'"/\\', // defaults to the set " %+~`#$&*()|[]{}:;<>?!'/@\"\\"
});
const myUserSecretAttached = myUserSecret.attach(instance); // Adds DB connections information in the secret
instance.addRotationMultiUser('MyUser', { // Add rotation using the multi user scheme
  secret: myUserSecretAttached,
});

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbonig.rds-tools-2.0.18.tar.gz (73.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mbonig.rds_tools-2.0.18-py3-none-any.whl (71.6 kB view details)

Uploaded Python 3

File details

Details for the file mbonig.rds-tools-2.0.18.tar.gz.

File metadata

  • Download URL: mbonig.rds-tools-2.0.18.tar.gz
  • Upload date:
  • Size: 73.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for mbonig.rds-tools-2.0.18.tar.gz
Algorithm Hash digest
SHA256 91ccf7d9ca8752662277e37f662cf1a2fcb1aa4a645fd9c09409ff93923e2d63
MD5 d6cb35bad5d7c3afa8fdd6996f9c6894
BLAKE2b-256 90c01ed72f3a8fe76d9ae3baca5407b126936747a1a9b5db690203818c88820b

See more details on using hashes here.

File details

Details for the file mbonig.rds_tools-2.0.18-py3-none-any.whl.

File metadata

File hashes

Hashes for mbonig.rds_tools-2.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 3322c8c567754a73df39726149bafe6d7dafb010905f3076d50d63bb1351f97a
MD5 2d52c06fdab0df0afd23ac4ebc83d507
BLAKE2b-256 f6271b60ff9da1cd46d854f46a8a4de9fbc40978df96686ec2615840e59950dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page