{"id":16077713,"url":"https://github.com/lfreneda/aws-secrets-manager","last_synced_at":"2026-01-16T08:52:50.049Z","repository":{"id":57126899,"uuid":"215840983","full_name":"lfreneda/aws-secrets-manager","owner":"lfreneda","description":":key: High level interface (with cache) for AWS Secrets Manager","archived":false,"fork":false,"pushed_at":"2024-01-20T02:19:10.000Z","size":231,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T13:14:59.270Z","etag":null,"topics":["aws","aws-sdk","aws-sdk-javascript","aws-secrets-manager","secret","secrets-manager","secretsmanage"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lfreneda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-17T16:46:13.000Z","updated_at":"2024-10-01T19:45:14.000Z","dependencies_parsed_at":"2024-09-22T20:00:54.008Z","dependency_job_id":"242b78e8-e130-4d90-8fc0-56463786611f","html_url":"https://github.com/lfreneda/aws-secrets-manager","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"5905a9d7476694e7180a6f1546477b8264685aa3"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreneda%2Faws-secrets-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreneda%2Faws-secrets-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreneda%2Faws-secrets-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfreneda%2Faws-secrets-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfreneda","download_url":"https://codeload.github.com/lfreneda/aws-secrets-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237739846,"owners_count":19358624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-sdk","aws-sdk-javascript","aws-secrets-manager","secret","secrets-manager","secretsmanage"],"created_at":"2024-10-09T10:02:20.759Z","updated_at":"2025-10-22T20:30:42.839Z","avatar_url":"https://github.com/lfreneda.png","language":"TypeScript","funding_links":[],"categories":["aws"],"sub_categories":[],"readme":"# aws-secrets-manager\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/05eab62203d074210414/maintainability)](https://codeclimate.com/github/lfreneda/aws-secrets-manager/maintainability)\n\n:key: High level interface (with cache) for AWS Secrets Manager\n\n## Install\n\n```shell\nnpm install @lfreneda/aws-secrets-manager --save\n```\n\n```shell\nyarn add @lfreneda/aws-secrets-manager\n```\n\n## What's New in Version 1.0.0\n\nThis release represents a **MAJOR** version update from `0.0.3`, indicating significant changes to the API. Users of version `^0.0.3` should be aware that this update is not backward-compatible. However, packages using version `^0.0.3` will not be automatically updated to `1.0.0`.\n\n### Major Changes\n\n- **Language Update**: The codebase has been migrated from JavaScript to TypeScript with correct types and JSDOC documentation.\n- **Package Updates**: The AWS SDK has been updated to version 3. Node.js 14 and above is now supported (developed in Node.js version 18).\n- **Development Tools**: ESLint has been updated to the latest version with the \"Neon\" standard, and Prettier has been added to the project.\n- **Testing**: Unit tests have been added using Vitest for various functions, including `SecretManager`, `toConnectionString`, and `InMemoryCacheSecretsManagerDecorator`.\n- **API Changes**: Error handling has been improved with errors now mapped to their own classes. The `SecretManager` has been enhanced to accept an `inlineCache` parameter during instantiation, and the `getSecretValue` method now supports a `bypassCache` parameter.\n\n### Note on Cache\n\nWhen using the secret manager with `inlineCache`, the secrets will be cached for 10 minutes, if you need to bypass the cache, you can use the `bypassCache` parameter.\n\nIf your needs require any changes to the cache, you can implement your own cache by disabling the `inlineCache` and using the `InMemoryCacheSecretsManagerDecorator` decorator, see the [Node-Cache](https://www.npmjs.com/package/node-cache) package for more information on configuration options.\n\n### Utils\n\nIf you are using secrets for RDS credentials, there is also a helper to convert database settings to a connection string: `toConnectionString`.\n\n## How to use\n\nInline cache implementation:\n\n```javascript\nconst { SecretsManager } = require('@lfreneda/aws-secrets-manager')\nconst secretsManager = new SecretsManager({ region: 'us-east-1' })\nconst secretValue = await secretsManager.getSecretValue('sample/key')\n```\n\nTo use the in-memory cache implementation:\n\n```javascript\nconst { SecretsManager, InMemoryCacheSecretsManagerDecorator } = require('@lfreneda/aws-secrets-manager')\nconst secretsManager = new SecretsManager({ region: 'us-east-1' }, false)\nconst cachedSecretManager = new InMemoryCacheSecretsManagerDecorator(secretsManager)\nconst secretValue = await cachedSecretManager.getSecretValue('sample/key')\n```\n\nTo use the `bypassCache` parameter:\n\n```javascript\nconst { SecretsManager } = require('@lfreneda/aws-secrets-manager')\nconst secretsManager = new SecretsManager({ region: 'us-east-1' })\nconst secretValue = await secretsManager.getSecretValue('sample/key', true)\n```\n\n## Running tests\n\nTests were made using [Vitest](https://vitest.dev/) and [Sinon](https://sinonjs.org/)\n\n```shell\nnpm test\n```\n\n## Need Help?\n\nIf you have questions or encounter issues while transitioning to version 1.0.0, please feel free to open an issue on GitHub for assistance.\n\nMake sure to adjust the installation, usage, and testing instructions as needed for your project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfreneda%2Faws-secrets-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfreneda%2Faws-secrets-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfreneda%2Faws-secrets-manager/lists"}