jmsfwk/aws-secrets-manager

Library for caching AWS Secrets Manager values

1.0.0 2021-07-31 16:06 UTC

This package is auto-updated.

Last update: 2024-12-08 15:58:47 UTC


README

The PHP AWS SDK doesn't provide a caching system for Secret Manager calls. This package provides a very simple class that will use a PSR-16 Simple Cache to cache string secrets.

Setup

Install with Composer

$ composer require jmsfwk/aws-secrets-manager

Then create a SecretsManager instance.

<?php

use Aws\SecretsManager\SecretsManagerClient;
use jmsfwk\AwsSecretsManager\SecretsManager;
use Psr\SimpleCache\CacheInterface;

/** @var CacheInterface $cache */

$secretsManager = new SecretsManager($cache, new SecretsManagerClient(/* aws options */));