Download the PHP package paeire/laravel-rds-proxy-iam without Composer

On this page you can find all versions of the php package paeire/laravel-rds-proxy-iam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-rds-proxy-iam

laravel-rds-proxy-iam

Connect Laravel to AWS RDS / RDS Proxy using IAM database authentication. The package adds a mysql-iam-proxy database driver that generates a short-lived IAM auth token on every connection instead of relying on a static password.

Requirements

Installation

The service provider is auto-discovered — no manual registration required.

Configuration

Add a connection using the mysql-iam-proxy driver in config/database.php:

No password is set — it is replaced at connect time by a freshly generated IAM token.

AWS credentials

The IAM token is signed with the default AWS credential provider chain (Aws\Credentials\CredentialProvider::defaultProvider()), so it works with environment variables, an EC2/ECS/EKS instance role, or any standard AWS credential source. No AWS keys are stored by this package.

AWS-side setup (once)

  1. Enable IAM database authentication on the RDS instance / cluster (and on the RDS Proxy if used).
  2. Create a database user that authenticates with the AWS plugin, for example: CREATE USER 'iam_user'@'%' IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';
  3. Grant the IAM principal permission to connect with an rds-db:connect policy scoped to that database user.

How it works (load order)

Registration is order-independent. The connector is bound in the container as db.connector.mysql-iam-proxy (which Laravel's ConnectionFactory resolves automatically), and the connection itself is registered through Illuminate\Database\Connection::resolverFor(). Because both live outside the resolved db manager, the driver is ready the moment the service provider's register() runs — you do not need to reorder providers, even if another provider resolves the database very early.

The PDO connection (and therefore the IAM token) is created lazily on first query, keeping the token close to its use within its ~15-minute validity window and preserving Laravel's reconnect and read/write connection behavior.

Options

Each option can be set on the Laravel connection array and, as a fallback, via an environment variable.

Option Env fallback Default Description
host DB_HOST — (required) Host Laravel connects to (tunnel/proxy).
port DB_PORT 3306 Port Laravel connects to.
database DB_DATABASE — Default database.
username DB_USERNAME — (required) IAM-enabled database user.
token_host DB_TOKEN_HOST host Host used to sign the IAM token.
token_port DB_TOKEN_PORT port Port used to sign the IAM token.
aws_region AWS_REGION us-east-1 Region for token signing.
ssl_ca DB_SSL_CA — Path to a CA bundle for TLS.
ssl_verify DB_SSL_VERIFY true Verify the server certificate.
connect_timeout DB_CONNECT_TIMEOUT 5 PDO connect timeout (seconds).
force_readonly DB_FORCE_READONLY false Force a read-only, safe-updates session.
session_init_statements DB_SESSION_INIT_STATEMENTS — ;-separated string or array of SQL to run on connect.
enable_cleartext_plugin — true Enable the MySQL cleartext auth plugin (required for IAM).

Security notes

Testing

Contributing

Issues and pull requests are welcome at https://github.com/paeire/laravel-rds-proxy-iam.

License

The MIT License (MIT). See LICENSE.


All versions of laravel-rds-proxy-iam with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
aws/aws-sdk-php Version ^3.300
illuminate/database Version ^10|^11|^12
illuminate/support Version ^10|^11|^12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package paeire/laravel-rds-proxy-iam contains the following files

Loading the files please wait ...