@alicloud/sts-sdk
Advanced tools
Weekly downloads
Readme
npm install @alicloud/sts-sdk
Node.js >= 8.5.0 required.
const StsClient = require('@alicloud/sts-sdk');
const sts = new StsClient({
endpoint: 'sts.aliyuncs.com', // check this from sts console
accessKeyId: '***************', // check this from aliyun console
accessKeySecret: '***************', // check this from aliyun console
});
async function demo() {
const res1 = await sts.assumeRole(`acs:ram::${accountID}:role/${roleName}`, 'xxx');
console.log(res1);
const res2 = await sts.getCallerIdentity();
console.log(res2);
}
demo();
assumeRole()
acs:ram::${accountID}:role/${roleName}
getCallerIdentity()
generateSessionAccessKey()
You should set environment variables before running the test or coverage. For example:
ACCESS_KEY=<your access key> SECRET_KEY=<your secret key> ENDPOINT=sts.aliyuncs.com npm run test
ACCESS_KEY=<your access key> SECRET_KEY=<your secret key> ENDPOINT=sts.aliyuncs.com npm run cov
FAQs
alibaba cloud sts client for node.js
The npm package @alicloud/sts-sdk receives a total of 542 weekly downloads. As such, @alicloud/sts-sdk popularity was classified as not popular.
We found that @alicloud/sts-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.