Configuring region in Node.js AWS SDK

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

    I know I am EXTREMELY late to the party, but I have an additional solution which worked for me.

    It might be worth passing credentials to each resource directly.

    let lambda = AWS.Lambda({region: "us-east-1"});
    let credentials = new AWS.SharedIniFileCredentials({
        profile: PROFILE_NAME,   
    });
    
    lambda.config.credentials = credentials;
    

提交回复
热议问题