--- id: aws-secretsmanager-caching version: "1.1.3" license: unclear license_treatment: permissive maintenance: active --- # aws-secretsmanager-caching — Client-side AWS Secrets Manager caching library License: permissive · Maintenance: active · Downloads: 2.9M/mo ## What it is and what it does This package provides a client-side caching layer for AWS Secrets Manager that stores retrieved secrets in memory, reducing repeated API calls to AWS. It wraps botocore to handle secret retrieval and caching logic, allowing applications to configure cache size, refresh intervals, and retry behavior for failed requests. The library is designed for Python applications that need to access secrets frequently without incurring the latency and cost of repeated AWS API calls. It includes decorators to inject secrets directly into function arguments and supports both simple string secrets and JSON-based secret objects. Configuration options control cache size, refresh timing, and exception retry strategies. Use it for: - Reduce API call volume in applications that access the same secrets multiple times during request handling. - Inject database credentials or API keys into function parameters using decorators without explicit secret retrieval code. - Configure automatic secret refresh intervals to balance freshness with API call reduction. - Handle transient AWS API failures with exponential backoff retry logic before surfacing errors to the application. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Caches AWS Secrets Manager secrets in-process to reduce API calls and improve application performance when retrieving secrets repeatedly. Yes. The package is actively maintained, has no known vulnerabilities, minimal dependencies, and solves a real problem for AWS-based Python applications. The permissive Apache 2.0 license and stable production status make it a low-risk addition. Install if your application retrieves secrets from AWS Secrets Manager more than occasionally. ## Install pip install aws-secretsmanager-caching uv add aws-secretsmanager-caching poetry add aws-secretsmanager-caching ## Installing aws-secretsmanager-caching Before you install: Low install friction with a single runtime dependency (botocore). Actively maintained with recent commits and stable production status. License in practice: Licensed under Apache 2.0, a permissive license allowing commercial and private use with minimal restrictions. Quickstart: pip install aws-secretsmanager-caching import botocore.session from aws_secretsmanager_caching import SecretCache, SecretCacheConfig client = botocore.session.get_session().create_client('secretsmanager') cache = SecretCache(config=SecretCacheConfig(), client=client) secret = cache.get_secret_string('mysecret') Requires Python 3.7 or newer and an AWS account with access to AWS Secrets Manager. Verify before relying: - Whether the cache TTL and refresh interval defaults (3600 seconds) are suitable for typical secret rotation workflows. - Performance impact of the configurable max_cache_size (default 1024) on memory usage in high-secret scenarios. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags AWS secrets manager caching, in-process secret caching, reduce secrets manager API calls, Python secrets caching client, AWS credential caching, secret refresh and cache, botocore secrets caching, aws-integration, credential-management, caching [View on SkillFed](https://skillfed.io/packages/aws-secretsmanager-caching) · [View on PyPI](https://pypi.org/project/aws-secretsmanager-caching/)