@robertoaraneda/nestjs-s3
v1.0.0
Published
AWS S3 module for NestJS
Downloads
3
Readme
AWS S3 library for NestJS
Instructions
Install
npm install @robertoaraneda/nestjs-s3
Use library
Configure NestjsConsumerModule
- QueueUrl
- Handle message function
- 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],
})