hatchetaustralia/laravel-iam-db-auth

AWS IAM db auth package for laravel

0.2.0 2023-09-16 00:52 UTC

This package is auto-updated.

Last update: 2024-10-16 03:01:53 UTC


README

Forked from https://github.com/pixelvide/laravel-iam-db-auth

This is a package to connect Laravel with a AWS RDS instance using IAM authentication.

It includes a service provider that gives the framework our overridden MySQL/PGSQL connector class when it asks for an MySQL/PGSQL connection.

Installation

require this package with composer:

composer require hatchetaustralia/laravel-iam-db-auth

Add a missing variables in connection to the config array in config/database.php

<?php [
    'mysql' => [
        'aws_region' => env('AWS_DEFAULT_REGION'),
        'use_iam_auth' => env('DB_USE_IAM_AUTH', true),
    ],
];

Obtain the rds-combined-ca-bundle.pem from https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html