@byu-oit/shared-rds-handel-extension
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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
<SERVICE_NAME>_ADDRESS The DNS name of the MySQL database address.
<SERVICE_NAME>_PORT The port on which the MySQL instance is listening.
<SERVICE_NAME>_DATABASE_NAME The name of the database in the shared MySQL instance.
<SERVICE_NAME>_ADMIN_USERNAME The username of the admin user for your database.
<SERVICE_NAME>_READ_WRITE_USERNAME The username of the read-write user for your database.
<SERVICE_NAME>_READ_ONLY_USERNAME The username of the read-only user for your database.
<SERVICE_NAME>_ADMIN_PASSWORD_PARAM_NAME The parameter name for the admin user's password.
<SERVICE_NAME>_READ_WRITE_PASSWORD_PARAM_NAME The parameter name for the read-write user's password.
<SERVICE_NAME>_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
<parameter_prefix>.<service_name>.db_admin_password The password for the admin user.
<parameter_prefix>.<service_name>.db_read_write_password The password for the read-write user.
<parameter_prefix>.<service_name>.db_read_only_password The password for the read-only user.

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

1

Version

0.1.0

License

Apache-2.0

Unpacked Size

29.3 kB

Total Files

15

Last publish

Collaborators

  • mjweather
  • yoshutch
  • lehinpm
  • oscea
  • stuft2
  • mhailstone
  • arasmus8
  • garygsc
  • martingarn
  • snelg
  • byu-oit-bot