aws-back-utils
v1.0.5
Published
A collection of essential backend utilities, providing database connection management for AWS.
Downloads
8
Readme
AWS Back Utils
This package provides common backend utilities for AWS-related projects. It is specifically designed to facilitate the management and use of database connections in AWS.
Installation
To install the package, run the following command in your Node.js project:
npm install aws-back-utils
Usage
The aws-back-utils
package includes useful functions for managing database connections. Here is an example of how to use the function to obtain a database connection pool:
const getDbPool = require('aws-back-utils');
// Get a connection pool for your database
const dbPool = getDbPool('myAwsSecretName', 'myAwsRegion');
getDbPool
This function creates and returns a connection pool to an AWS database. It requires two parameters:
awsSecretName: The unique identifier for the database.
awsRegion: The AWS region where the database is located.
## Configuration
Ensure the following Key/value are defined in your AWS Secret:
username
host
password
port
These Key/values are necessary to obtain the database credentials.
## Contribution
To contribute to aws-back-utils, please open an issue to discuss proposed changes.
## License
This project is licensed under the ISC License.