Home > other >  AWS. MetadataService is not a constructor
AWS. MetadataService is not a constructor

Time:09-16

I through the node in the presents integrated aws - SDK, via
Var AWS=the require (' AWS - SDK);
AWS. Config. Region='eu - west - 2;//Sydney
AWS. Config. ApiVersion='2012-05-04';
Var metadata=https://bbs.csdn.net/topics/new AWS. MetadataService ();
The metadata. The request ('/latest/meta - data/iam/security credentials/', function (err, rolename) {
If (err) {
The console. The info (" err, err);
} else {
The console. The info (" rolename ", rolename);
}
});
To get the rolename
But it is an error, tell me the AWS. MetadataService is not a constructor,
Hope who can tell,
thank you
  •  Tags:  
  • AWS
  • Related