Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@dsandor/aws-secret-manager
Advanced tools
A simple way to get a secret from AWS Secrets Manager.
Assumes that AWS credentials are set in .aws
or as Environment Variables.
yarn add @dsandor\aws-secret-manager
const SecretManager = require('@dsandor\aws-secret-manager');
const secretManager = new SecretManager('my-secret-id');
const secret = await secretManager.getSecrets();
You can also pass the secret id on the getSecrets
call.
const SecretManager = require('@dsandor\aws-secret-manager');
const secretManager = new SecretManager();
const secret = await secretManager.getSecrets('my-secret-id');
Or one line if you wish;
const SecretManager = require('@dsandor\aws-secret-manager');
const secret = await new SecretManager().getSecrets('my-secret-id');
/**
* .ctor
* @param secretName - optionally set the secret to retrieve.
* @param region - the AWS region where the secret exists. Defaults: AWS_REGION, AWS_DEFAULT_REGION, us-east-1
*/
SecretManager(secretName, region = process.env['AWS_REGION'] || process.env['AWS_DEFAULT_REGION'] || 'us-east-1')
/**
* Get's the secrets for an environment.
* @param secretName - the name (or id) of the secret in AWS.
* @returns {Promise<string|any>} - Returns a JS Object if the results can be parsed otherwise it returns the raw string.
*/
async getSecrets(secretName = this.secretName)
FAQs
A simple way to get a secret from AWS Secrets Manager.
We found that @dsandor/aws-secret-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.