title: image upload to AWS S3 using nestjs and typescript
body: <p>I want to upload images to AWS S3 bucket from nestjs using multer-s3.<br>
  This is how i have wrote my code to configure with AWS S3:<br>
  <br></p>
  
  <pre><code>import * as multer from 'multer';&lt;br&gt;
  import * as AWS from 'aws-sdk';&lt;br&gt;
  import * as multerS3 from 'multer-s3';&lt;br&gt;
  
  const AWS_S3_BUCKET_NAME = process.env.AWS_S3_BUCKET_NAME;&lt;br&gt;
  const s3 = new AWS.S3();&lt;br&gt; 
  AWS.config.update({&lt;br&gt;
  accessKeyId: process.env.AWS_ACCESS_KEY_ID,&lt;br&gt;
  secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,&lt;br&gt;
  });
  
  @ApiBearerAuth()
  @UseGuards(AuthGuard('jwt'))
  @Post('/:hotelid')&lt;br&gt;
  @UsePipes(ValidationPipe)
  @UseInterceptors(
    FilesInterceptor('file',5,{
    storage: multerS3({
      s3: s3,
      bucket: AWS_S3_BUCKET_NAME,
      acl: 'public-read',
      key: function(request, file, cb) {
        cb(null, `${Date.now().toString()} - ${file.originalname}`);
      },
    }),
    fileFilter: imageFileFilter,
  }),
  )
  
      createRoom(
      @Req() req:any,
      @Param('hotelid') id:number,
      @UploadedFiles() file,
      @Body() createRoomDto : CreateRoomDto,
  ):Promise&lt;Room&gt;
  {   
      return this.roomsService.createRoom(req.user,createRoomDto,id,req.files);  
  }
  </code></pre>
  
  <p><br>
  This code worked fine but I want to use AWS-SDK-JS-V3.<br>
  In aws sdk-js-V3, I can't use AWS.config.update({....})<br></p>
  
  <p>Can you please suggest me how can I change my code from aws-sdk-js v2 to aws-sdk-js-v3?</p>