title: Uploading image to amazon s3 using multer-s3 nodejs
body: <p>I am trying to upload an image to amazon s3 using <code>multer-s3</code>, but I am getting this error:</p>
  
  <blockquote>
    <p>TypeError: Expected opts.s3 to be object
    node_modules/multer-s3/index.js:69:20</p>
  </blockquote>
  
  <p>This is my server code:</p>
  
  <pre><code>var upload = multer({
      storage: s3({
          dirname: '/',
          bucket: 'bucket',
          secretAccessKey: 'key',
          accessKeyId: 'key',
          region: 'us-west-2',
          filename: function (req, file, cb) {
              cb(null, file.originalname); 
          }
      })
  });
  
  app.post('/upload', upload.array('file'), function (req, res, next) {
      res.send("Uploaded!");
  });
  </code></pre>
  
  <p>Why I am getting this error?</p>