@byu-oit/shared-rds-handel-extension

v0.1.0
shared rds handel extension

Shared RDS Handel Extension

This is an extension for handel that will create a database inside of a shared RDS instance.

Note

This extension will only work if the shared-rds-iac infrasctructure is deployed on the AWS account you are deploying your app to.

When using this extension, it will create a database within a shared RDS instance and then create 3 database users that only have access to that database. One user is the admin user for that database with all access to the database. One read-write user and a read-only user.

Parameters

Parameter Type Required Description
type string Yes This must be <extension_name>::mysql for this service type.
database_name string Yes The name of your database in the shared MySQL instance.

Example Handel File

version: 1

name: test

extensions:
  shared: shared-rds-handel-extension

environments:
  dev:
    shared-db:
      type: shared::mysql
      database_name: test_db
    test-lambda:
      type: lambda
      path_to_code: src
      handler: handler.lambda_handler
      runtime: python3.6
      vpc: true
      dependencies:
      - shared-db

Depending on this Service

The shared MySQL service outputs the following environment variables:

Environment Variable Description
_ADDRESS The DNS name of the MySQL database address.
_PORT The port on which the MySQL instance is listening.
_DATABASE_NAME The name of the database in the shared MySQL instance.
_ADMIN_USERNAME The username of the admin user for your database.
_READ_WRITE_USERNAME The username of the read-write user for your database.
_READ_ONLY_USERNAME The username of the read-only user for your database.
_ADMIN_PASSWORD_PARAM_NAME The parameter name for the admin user's password.
_READ_WRITE_PASSWORD_PARAM_NAME The parameter name for the read-write user's password.
_READ_ONLY_PASSWORD_PARAM_NAME The parameter name for the read-only user's password.

In addition, the shared MySQL service puts the following credentials into the EC2 parameter store:

Parameter Name Description
..db_admin_password The password for the admin user.
..db_read_write_password The password for the read-write user.
..db_read_only_password The password for the read-only user.
npm i @byu-oit/shared-rds-handel-extension

Metadata

Downloads