问题
I'm using the AWS JavaScript SDK.
Both -
var s3 = new AWS.S3();
var dynamodb = new AWS.DynamoDB();
Works fine.
When I try -
var iam = new AWS.IAM();
I am presented with:
TypeError: AWS.IAM is not a constructor
回答1:
This means that IAM is not part of the SDK that you downloaded.
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.
SDK Builder
来源:https://stackoverflow.com/questions/47081457/aws-iam-is-not-a-constructor-javascript-sdk