PHPackages                             afterdigital/laravel-iam-db-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. afterdigital/laravel-iam-db-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

afterdigital/laravel-iam-db-auth
================================

AWS IAM database auth package for laravel

5201[1 issues](https://github.com/afterdigital/laravel-iam-db-auth/issues)PHP

Since May 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/afterdigital/laravel-iam-db-auth)[ Packagist](https://packagist.org/packages/afterdigital/laravel-iam-db-auth)[ RSS](/packages/afterdigital-laravel-iam-db-auth/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel IAM DB Authentication
-----------------------------

[](#laravel-iam-db-authentication)

**This is a work in progress**

*I created this package after being asked to use this method of database connection for a client project. I found very litte information online covering this so there was a lot of trial and error.*

*This will probably not work out of the box for your own needs but will hopefully act as a starting point to help you get set up.*

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 connector class when it asks for an MySQL connection.

Installation
------------

[](#installation)

require this package with composer:

```
composer require afterdigital/laravel-iam-db-auth
```

Add the IamDatabaseConnectorProvider to your config/app.php

Add a mysql\_iam connection to the config array in config/database.php

```
'mysql_iam' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'database_name'),
    'username' => env('DB_USERNAME', 'database_username'),
    'password' => '',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'strict' => false,
    'engine' => null,
    'aws_profile' => env('AWS_PROFILE'),
    'aws_credential_path' => env('AWS_CREDENTIAL_PATH'),
    'aws_region' => env('AWS_REGION'),
    'use_iam_auth' => env('DB_USE_IAM_AUTH', true),
    'options' => array(
        'MYSQLI_READ_DEFAULT_FILE' => env('MYSQL_CNF_FILE', '/path/to/cnf/file'),
        PDO::MYSQL_ATTR_SSL_CA    => env('RDS_CA_BUNDLE', '/path/to/rds-combined-ca-bundle.pem'),
    ),
],
```

Obtain the rds-combined-ca-bundle.pem from

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a80df3fcff29ea5bde4765188cf70b272b7905d5c6e25fcf86ddfde3a23074b1?d=identicon)[afterdigital](/maintainers/afterdigital)

---

Top Contributors

[![stu-ad](https://avatars.githubusercontent.com/u/31043325?v=4)](https://github.com/stu-ad "stu-ad (6 commits)")

### Embed Badge

![Health badge](/badges/afterdigital-laravel-iam-db-auth/health.svg)

```
[![Health](https://phpackages.com/badges/afterdigital-laravel-iam-db-auth/health.svg)](https://phpackages.com/packages/afterdigital-laravel-iam-db-auth)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
