PHPackages                             customergauge/redshift - 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. [Database &amp; ORM](/categories/database)
4. /
5. customergauge/redshift

ActiveLibrary[Database &amp; ORM](/categories/database)

customergauge/redshift
======================

Redshift Connector for Laravel with AWS Secret Manager

1.2.1(10mo ago)1888↓81.9%MITPHPPHP &gt;=8.0

Since May 19Pushed 10mo ago2 watchersCompare

[ Source](https://github.com/cgauge/redshift-connector)[ Packagist](https://packagist.org/packages/customergauge/redshift)[ RSS](/packages/customergauge-redshift/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (8)Used By (0)

Laravel Redshift Connector
==========================

[](#laravel-redshift-connector)

This library provides a custom database driver for Laravel to connect seamlessly with **Amazon Redshift**. It allows proper integration with Redshift’s PostgreSQL-compatible interface, with support for custom connection behaviors and optional AWS Secrets Manager integration.

Inspiration
-----------

[](#inspiration)

This library was inspired on [Laravel Aurora Connector](https://github.com/cgauge/laravel-aurora-connector/)

🚀 Installation
--------------

[](#-installation)

```
composer require customergauge/redshift
```

⚙️ Usage
--------

[](#️-usage)

In your `config/database.php`, define a connection using the `redshift` driver:

```
'redshift' => [
    'driver' => 'redshift',
    'host' => env('REDSHIFT_HOST'),
    'port' => env('REDSHIFT_PORT', 5439),
    'database' => env('REDSHIFT_DATABASE'),
    'username' => env('REDSHIFT_USERNAME'),
    'password' => env('REDSHIFT_PASSWORD'),
    'charset' => 'utf8',
    'prefix' => '',
    'schema' => 'public',
    'options' => [],
    'redshift' => [
        'secret' => env('AWS_REDSHIFT_SECRET'), // optional
        'temporary_credential' => [] // optional: IAM-based temporary auth
    ],
],
```

You can optionally configure a secret name for AWS **AWS Secrets Manager** via `redshift.secret` to securely fetch the database credentials.

Alternatively, if your application runs with sufficient IAM permissions, you can use temporary credentials to connect to Redshift. To enable this, set the temporary\_credential option in the redshift config:

```
'temporary_credential' => [
    'workgroupName' => 'your-redshift-workgroup-name', // mandatory to work
    // You may also pass any valid parameters supported by AWS Redshift Serverless getCredentials API
],
```

When this option is enabled, the application will connect to Amazon Redshift using short-lived credentials obtained via AWS IAM authentication, improving security by avoiding static passwords and enabling fine-grained access control.

**This requires your application (e.g. ECS task, Lambda, EC2, etc.) to assume an IAM role with permission to call redshift-serverless:GetCredentials**

🌍 AWS Configuration
-------------------

[](#-aws-configuration)

Make sure you define your AWS region in `config/aws.php`, especially if using Secrets Manager:

```
return [
    'region' => env('AWS_REGION', 'eu-west-1'),
    // other AWS services config
];
```

📦 Secrets Manager Support
-------------------------

[](#-secrets-manager-support)

This package can integrate with [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) to load your Redshift credentials at runtime.

To improve performance, we recommend using the [AWS Secrets Manager Caching Extension](https://github.com/cgauge/aws-secretsmanager-caching-extension).

🧪 Example Query
---------------

[](#-example-query)

Once configured, you can use Eloquent or Query Builder as usual:

```
DB::connection('redshift')->table('events')->select('user_id')->limit(10)->get();
```

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Feel free to open issues, suggest improvements, or submit PRs.

📝 License
---------

[](#-license)

Laravel Redshift Connector is licensed under the **MIT License**.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance54

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~16 days

Total

4

Last Release

306d ago

### Community

Maintainers

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

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

---

Top Contributors

[![alustau](https://avatars.githubusercontent.com/u/2944692?v=4)](https://github.com/alustau "alustau (13 commits)")

---

Tags

laravelpasswordpostgresconnectorsecretrotationredshift

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/customergauge-redshift/health.svg)

```
[![Health](https://phpackages.com/badges/customergauge-redshift/health.svg)](https://phpackages.com/packages/customergauge-redshift)
```

###  Alternatives

[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)[rodrigopedra/laravel-query-logger

Laravel query logger

1211.8k](/packages/rodrigopedra-laravel-query-logger)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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