AWS.IAM不是构造函数JavaScript SDK
问题描述:
我正在使用AWS JavaScript SDK 。
两者 -
var s3 = new AWS.S3();
var dynamodb = new AWS.DynamoDB();
工作正常。
当我尝试 -
var iam = new AWS.IAM();
我看到:
TypeError:AWS.IAM不是构造函数
TypeError: AWS.IAM is not a constructor
答
这意味着IAM不是您下载的SDK的一部分。
This means that IAM is not part of the SDK that you downloaded.
在当前的SDK构建器中,默认情况下不启用IAM。转到此页面并添加所需的服务并下载新版本。
In the current SDK builder, IAM is not enabled by default. Go to this page and add the services that you need and download a new version.