Configuring region in Node.js AWS SDK

前端 未结 14 1536
失恋的感觉
失恋的感觉 2020-12-05 03:30

Can someone explain how to fix a missing config error with Node.js? I\'ve followed all the examples from the aws doc page but I still get this error no matter what.

14条回答
  •  春和景丽
    2020-12-05 04:24

    I'm impressed this hasn't been posted here yet.

    Instead of setting the region with AWS.config.update(), you can use

    const s3 = new AWS.S3({
      region: "eu-central-1",
    });
    

    to make it instance specific.

提交回复
热议问题