BeerMoneyDev / nest-aws-sdk

A thin wrapping layer around the aws-sdk package for clean NestJS dependency injection.
MIT License
92 stars 13 forks source link

can i use this sdk without passing the credentials - my instance role already has access to S3 #20

Open Alsaheem opened 1 year ago

Alsaheem commented 1 year ago

Hello

Can i use this sdk without passing the credentials object i.e passing a file or passing Secret_Access_Key and Access_Key

`

AwsSdkModule.forRootAsync({
      defaultServiceOptions: {
        useFactory: (configService: ConfigService) => ({
          region: 'us-east-1',
          signatureVersion: 'v4',
        })

instead of the below

AwsSdkModule.forRootAsync({
      defaultServiceOptions: {
        useFactory: (configService: ConfigService) => ({
          region: 'us-east-1',
          credentials: {
            accessKeyId: configService.get('AWS_S3_ACCESS_KEY'
            secretAccessKey: configService.get(
              'AWS_S3_SECRET_KEY',
            ),
          },
          signatureVersion: 'v4',
        })

`

Alsaheem commented 1 year ago

@KerryRitter