Configuring region in Node.js AWS SDK

前端 未结 14 1553
失恋的感觉
失恋的感觉 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:03

    How about changing the order of statements? Update AWS config before instantiating s3 and dd

    var AWS = require('aws-sdk');
    AWS.config.update({region:'us-east-1'});
    
    var dd = new AWS.DynamoDB();
    var s3 = new AWS.S3();
    

提交回复
热议问题