0

According to the Node AWS SDK documentation, new objects take the AWS object's configuration when initialized, and updating the AWS object's configuration will not change an instantiated object's config, so it must be updated manually. The docs specifically say you can do this, but updating the instantiated object manually doesn't seem to work.

var AWS = require('aws-sdk')
, awsInstance;

AWS.config.update({region: 'us-west'});
awsInstance = new AWS();

awsInstance.config.update({region: 'us-east'});

awsInstance's region is still set to us-west. How do you update it after instantiating the object?

4

1 に答える 1