Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须实现一个 NodeJS 应用程序,让用户在运行时选择要查询的几个 AWS 配置文件(prod、beta 或 dev)。是否可以通过以编程方式传入单独的凭据集来查询同一进程中的多个 AWS 实例?还是 SDK 只允许一个进程连接到一个配置文件?
而不是这个
const AWS = require('aws-sdk'); AWS.config.update(prodConfig); const s3 = new AWS.S3();
做这个
const AWS = require('aws-sdk'); const s3prd = new AWS.S3(prodConfig); const s3dev = new AWS.S3(devConfig);