Skip to content

Port of obsolete "incompass/aws-secrets-bundle" package.

License

Notifications You must be signed in to change notification settings

countxvat/aws-secrets-bundle

Repository files navigation

AWS Secrets Bundle

Easy loading of AWS Secrets Manager Secrets for Symfony

Installation

$ composer require countxvat/aws-secrets-bundle

Configuration

aws_secrets:
  client_config:
    region:           # required if ignore is false
    version: 'latest' # defaults to latest
    credentials: 
        key: ~
        secret: ~
  cache: 'array'      # one of 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

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 seperate 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!

About

Port of obsolete "incompass/aws-secrets-bundle" package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published