1.0.0 • Published 11 months ago

@robertoaraneda/nestjs-s3 v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

AWS S3 library for NestJS

Instructions

Install

npm install @robertoaraneda/nestjs-s3

Use library

Configure NestjsConsumerModule

  1. QueueUrl
  2. Handle message function
  3. Configure AWS credentials and region
  import { NestjsSqsConsumerModule } from '@robertoaraneda/nestjs-s3';

  NestjsS3Module.forRootAsync({
    imports: [ConfigModule],
    useFactory: async (configService: ConfigService) => ({
      bucketName: 'bucketname',
      s3Config: {
        region: configService.get('AWS_REGION'),
        credentials: {
          accessKeyId: process.env.AWS_ACCESS_KEY_ID,
          secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
        },
      },
    }),
    inject: [ConfigService],
  })
1.0.0

11 months ago