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(11mo ago)11.5k↑411.5%MITPHPPHP &gt;=8.0

Since May 19Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/cgauge/redshift-connector)[ Packagist](https://packagist.org/packages/customergauge/redshift)[ RSS](/packages/customergauge-redshift/feed)WikiDiscussions main Synced 3w 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 77% of packages

Maintenance50

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

351d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/219340?v=4)[Abe](/maintainers/abdala)[@abdala](https://github.com/abdala)

![](https://avatars.githubusercontent.com/u/2944692?v=4)[Denis Alustau](/maintainers/Alustau)[@alustau](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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