有many ways为 AWS 开发工具包提供凭证以执行操作。
在我尝试在我们的持续部署系统上操作之前,我想确保任何方法都成功地设置了接口(interface)。
如何检查 AWS 开发工具包是否能够找到凭据?
最佳答案
您可以通过 config.credentials
property 访问它们在主要客户端上。 SDK 中包含的所有 AWS 服务库都有一个 config property .
Class: AWS.Config
The main configuration class used by all service objects to set the region, credentials, and other options for requests.
By default, credentials and region settings are left unconfigured. This should be configured by the application before using any AWS service APIs.
// Using S3
var s3 = new AWS.S3();
console.log(s3.config.credentials);
关于node.js - 如何检查 AWS 开发工具包是否提供了凭据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38254107/