Have ideas to improve npm?Join in the discussion! »

    nest-aws-secrets-manager
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    Secrets Manager Logo

    Description

    An effficient Nest.js AWS Secrets Manager

    Installation

    $ npm install nest-aws-secrets-manager

    Adding the Global Module

    Add the AwsSecretsManagerModule to your App Module imports. It will register globally.

    import { AWSSecretsManagerModule } from 'nest-aws-secrets-manager';
    import { AppService } from './app.service';
    import { Module } from '@nestjs/common';
    import { SecretsManager } from 'aws-sdk';
     
    @Module({
      imports: [AWSSecretsManagerModule.forRoot(new SecretsManager())],
      providers: [AppService],
    })
    export class AppModule {}

    Use the Secrets Manager

    import { SecretsRetrieverService } from 'nest-aws-secrets-manager';
     
    export class AppService {
      constructor(private readonly secretsRetrieverService: SecretsRetrieverService) {}
     
      private async getCredentials: Credentials {
        return await this.secretsRetrieverService.getSecret<Credentials>('app-credentials');
      }
    }

    Support

    Pull requests are welcome. Please remember that commits must be made using Angular conventional-changelog

    Stay in touch

    License

    Nest-AWS-Secrets_manager is MIT licensed.

    Install

    npm i nest-aws-secrets-manager

    DownloadsWeekly Downloads

    16

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    18.9 kB

    Total Files

    17

    Last publish

    Collaborators

    • avatar