PHPackages                             constup/aws-secrets-bundle - 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. constup/aws-secrets-bundle

ArchivedSymfony-bundle

constup/aws-secrets-bundle
==========================

Use AWS Secrets as service container parameters in Symfony.

v2.0.0(3y ago)11202.6k↑16.5%17[1 issues](https://github.com/constup/aws-secrets-bundle/issues)[2 PRs](https://github.com/constup/aws-secrets-bundle/pulls)MITPHP &gt;=8.0

Since Aug 23Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/constup/aws-secrets-bundle)[ Packagist](https://packagist.org/packages/constup/aws-secrets-bundle)[ RSS](/packages/constup-aws-secrets-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (15)Used By (0)

IMPORTANT NOTE
==============

[](#important-note)

**Due to GitHub being integrated into Microsoft’s CoreAI division and effectivelly becoming Microsoft’s data source for training Microsoft’s LLMs without attributing or compensating open source authors and projects, this repository is now locked until it’s transferred to another platform.**

AWS Secrets Bundle
==================

[](#aws-secrets-bundle)

[![GitHub license](https://camo.githubusercontent.com/1a7b8bb4e502b8c64eac1dd10a361fa7d4407f094428f1952b49c84424a89ef2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636f6e737475702f6177732d736563726574732d62756e646c653f7374796c653d666c61742d73717561726526636f6c6f723d677265656e)](https://github.com/constup/aws-secrets-bundle/blob/master/LICENSE)[![PHP version](https://camo.githubusercontent.com/9d22ddcfdc950cb4a4e1e5980a900f277ec0ccc558893e8b23d59ae95f252954/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545372e342d626c756576696f6c65743f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/9d22ddcfdc950cb4a4e1e5980a900f277ec0ccc558893e8b23d59ae95f252954/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545372e342d626c756576696f6c65743f7374796c653d666c61742d737175617265)[![Symfony](https://camo.githubusercontent.com/5b0f66b4794e7a3c3586a02cec1b92784acc9c886099bbc7558b87663baa836a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545352e332d626c756576696f6c65743f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5b0f66b4794e7a3c3586a02cec1b92784acc9c886099bbc7558b87663baa836a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545352e332d626c756576696f6c65743f7374796c653d666c61742d737175617265)

Use AWS Secrets as service container parameters in Symfony.

History and honorable mentions
------------------------------

[](#history-and-honorable-mentions)

This bundle is loosely based on and inspired by `incompass/aws-secrets-bundle` (). The Incompass bundle is compatible with Symfony 3 and 4, and it looks like it's not updated/maintained anymore. This package is built to be compatible with Symfony 5 and will, over time, get improvements.

If you are still using Symfony 3 or 4, please use the Incompass bundle instead of this one.

Prerequisites
-------------

[](#prerequisites)

### Install AWS SDK

[](#install-aws-sdk)

Since the official recommendation from Symfony is: `A bundle must not embed third-party PHP libraries.  It should rely on the standard Symfony autoloading instead.`, the `aws/aws-sdk-php` Composer package is included in this bundle only as a dev dependency (for testing purposes).

You need to install AWS SDK for PHP in your project yourself:

```
composer require aws/aws-sdk-php
```

### AWS credentials

[](#aws-credentials)

In order to connect to any AWS service (for example: AWS Secrets Manager), your application must be authenticated on that AWS service. Since there are several scenarios for this, depending on your environment setup, configuring environments and using credentials is covered here: [AWS credentials and authentication](./doc/aws_credentials.md)

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

[](#installation)

There are two main versions of AWS Secrets bundle: 1.x and 2.x.

Install version 1.x to use this package with Symfony 5.x (5.3+) and PHP 7.4.

```
$ composer require constup/aws-secrets-bundle:^1

```

Install version 2.x to use this package with Symfony 6.x and PHP 8.x.

```
$ composer require constup/aws-secrets-bundle:^2

```

Configuration
-------------

[](#configuration)

By default, configuration for this bundle is loaded from `config/packages/aws_secrets.yaml` file or its environment-specific alternatives (for example: `config/packages/test/aws_secrets.yaml`). The following configuration properties are available:

```
aws_secrets:
  client_config:
    region:           # Required if "ignore" is false.
    version: 'latest' # Defaults to "latest".
    endpoint: ~
    credentials:
        key: ~
        secret: ~
  cache: 'array'      # Can be one of the following: apcu, array, filesystem. Default is array.
  delimiter: ','      # Delimiter to separate key from secret name.
  ignore: false       # Pass through AWS (for local dev environments set to "true").
```

Usage
-----

[](#usage)

Set an env var to an AWS Secret Manager Secret name like so:

```
AWS_SECRET=secret_name

```

If you want to grab a key in a JSON secret, you can separate the secret name and key:

```
AWS_SECRET=secret_name,key

```

Set a parameter to this environment variable with the aws processor:

```
parameters:
    my_parameter: '%env(aws:AWS_SECRET)%'
```

Your secret will now be loaded at runtime!

Development notes
-----------------

[](#development-notes)

- `master` branch only contains documentation.
- `di5` branch is compatible with PHP 7.4+ and Symfony Dependency Injection 5.3+. Release tags for this branch are 1.x.x
- `di6` branch is compatible with PHP 8.x and Symfony Dependency Injection 6.0+. Release tags for this branch are 2.x.x

Examples
--------

[](#examples)

- [Configure Doctrine to use AWS Secret values as MySQL connection parameters](./doc/sample_doctrine_mysql_connection.md)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 84% 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 ~27 days

Recently: every ~67 days

Total

11

Last Release

1454d ago

Major Versions

1.0.9 → v2.0.02022-05-25

PHP version history (2 changes)1.0PHP &gt;=7.4

v2.0.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![constup](https://avatars.githubusercontent.com/u/16638173?v=4)](https://github.com/constup "constup (21 commits)")[![nikoladstojiljkovic](https://avatars.githubusercontent.com/u/42273223?v=4)](https://github.com/nikoladstojiljkovic "nikoladstojiljkovic (2 commits)")[![satdeveloping](https://avatars.githubusercontent.com/u/80039573?v=4)](https://github.com/satdeveloping "satdeveloping (2 commits)")

---

Tags

symfonyawsenvsecrets-manager

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/constup-aws-secrets-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/constup-aws-secrets-bundle/health.svg)](https://phpackages.com/packages/constup-aws-secrets-bundle)
```

###  Alternatives

[aws/aws-sdk-php-symfony

A Symfony bundle for v3 of the AWS SDK for PHP

36517.7M22](/packages/aws-aws-sdk-php-symfony)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1682.4M2](/packages/uecode-qpush-bundle)[bref/symfony-messenger

Symfony Messenger bridge to run with SQS and SNS on AWS Lambda with Bref

721.2M6](/packages/bref-symfony-messenger)[bref/symfony-bridge

Makes Symfony work on AWS Lambda with Bref

491.7M5](/packages/bref-symfony-bridge)[async-aws/async-aws-bundle

Configure all your AsyncAws services and enjoy the autowire greatness.

243.6M2](/packages/async-aws-async-aws-bundle)[gwk/dynamo-session-bundle

DynamoDB Session Handler Bundle for Symfony 2

14210.9k](/packages/gwk-dynamo-session-bundle)

PHPackages © 2026

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