From 910e2ba7c30bc621fa28625dd3f108883b5c29ec Mon Sep 17 00:00:00 2001 From: Diego Cotelo <50673035+dcotelo@users.noreply.github.com> Date: Mon, 9 Dec 2019 14:28:57 -0300 Subject: [PATCH] Create README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b434330 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# AWS Secret Manager db driver + +### Features +- Ready to go database driver for AWS secret manager + +# Install + +#### Composer install + +`$ composer require dcotelo/aws-secret-dbdriver` + + +#### Load secrets in AWS Secret Manager as key/value pairs +Naming convention: `// ` +**Ex: Blog/stage/mysql** + + +#### Database configuration + +Database configuration `config/database.php` . + + 'connections' => [ + + 'mysql' => [ + 'driver' => 'secret-db', + ], + + + +#### Minimum secret attributes  + +```javascript +{ + "database": "blog_database", + "driver": "mysql", + "host": "127.0.0.1", + "password": "*******", + "port": "3306", + "username": "mysql_user" +} +``` + +#### Cache configuration +Default configuration keep the credentials in cache for 5 minutes customizable in `.env` file. + + DB_CACHE_TIME= + +#### AWS Credentials +In order to consume saved secrets aws credentials must be configured in `.env` +Ex: + + AWS_ACCESS_KEY_ID= + AWS_SECRET_ACCESS_KEY= + AWS_REGION=