admin管理员组文章数量:1295863
Currently setup my S3 access in Node using:
var AWS = require('aws-sdk');
AWS.config.region = 'us-west-1';
AWS.config.credentials = new AWS.SharedIniFileCredentials({profile: 'default'});
var s3 = new AWS.S3();
Now I would also like access to SES. Unfortunately, SES does not exist on us-west-1, so I had to setup SES on a different region.
How can I proceed? If I alter AWS.config, will that affect my previously instantiated s3?
Currently setup my S3 access in Node using:
var AWS = require('aws-sdk');
AWS.config.region = 'us-west-1';
AWS.config.credentials = new AWS.SharedIniFileCredentials({profile: 'default'});
var s3 = new AWS.S3();
Now I would also like access to SES. Unfortunately, SES does not exist on us-west-1, so I had to setup SES on a different region.
How can I proceed? If I alter AWS.config, will that affect my previously instantiated s3?
Share Improve this question asked Nov 1, 2016 at 18:37 logideliclogidelic 1,69521 silver badges46 bronze badges1 Answer
Reset to default 14Figured out that there are other ways to specify the region. This seems to do the trick:
var AWS = require('aws-sdk');
AWS.config.credentials = new AWS.SharedIniFileCredentials({profile: 'default'});
var s3 = new AWS.S3({region:'us-west-1'});
var ses = new AWS.SES({region:'us-west-2'});
本文标签: javascriptNodejs amp awssdk Simultaneous access to multiple regionsStack Overflow
版权声明:本文标题:javascript - Nodejs & aws-sdk: Simultaneous access to multiple regions? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741627351a2389161.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论