
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
aws-cli-js
Advanced tools
A node.js wrapper for the aws-cli command line interface
The aws command line interface must be installed and accessible in the path
npm install aws-cli-js
Then:
var awsCli = require('aws-cli-js');
var Options = awsCli.Options;
var Aws = awsCli.Aws;
With promise
var options = new Options(
/* accessKey */ 'your key',
/* secretKey */ 'your key2',
/* sessionToken */ 'your token',
/* currentWorkingDirectory */ null,
/* cliPath */ 'aws'
);
var aws = new Aws(options);
aws.command('iam list-users').then(function (data) {
console.log('data = ', data);
});
//data = {
// command: 'aws iam list-users ',
// raw: '{\\n \\"Users\\": [\\n {\\n \\"UserName\\": \\"developer\\", \\n \\"PasswordLastUsed\\": \\"2015-10-03T17:58:49Z\\", \\n \\"CreateDate\\": \\"2015-06-03T07:37:25Z\\", \\n \\"UserId\\": \\"AIDAJBXXXXXXXXXXXXXXXXX\\", \\n \\"Path\\": \\"/\\", \\n \\"Arn\\": \\"arn:aws:iam::03XXXXXXXXX:user/developer\\"\\n }\\n ]\\n}\\n',
// object:
// {
// Users:
// [{
// UserName: 'developer',
// PasswordLastUsed: '2015-10-03T17:58:49Z',
// CreateDate: '2015-06-03T07:37:25Z',
// UserId: 'AIDAJBXXXXXXXXXXXXXXXXX',
// Path: '/',
// Arn: 'arn:aws:iam::03XXXXXXXXX:user/developer'
// }]
// }
//}
With callback:
aws.command('iam list-users', function (err, data) {
console.log('data = ', data);
});
//data = {
// command: 'aws iam list-users ',
// raw: '["{\\n \\"Users\\": [\\n {\\n \\"UserName\\": \\"developer\\", \\n \\"PasswordLastUsed\\": \\"2015-10-03T17:58:49Z\\", \\n \\"CreateDate\\": \\"2015-06-03T07:37:25Z\\", \\n \\"UserId\\": \\"AIDAJBXXXXXXXXXXXXXXXXX\\", \\n \\"Path\\": \\"/\\", \\n \\"Arn\\": \\"arn:aws:iam::03XXXXXXXXX:user/developer\\"\\n }\\n ]\\n}\\n",""]',
// object:
// {
// Users:
// [{
// UserName: 'developer',
// PasswordLastUsed: '2015-10-03T17:58:49Z',
// CreateDate: '2015-06-03T07:37:25Z',
// UserId: 'AIDAJBXXXXXXXXXXXXXXXXX',
// Path: '/',
// Arn: 'arn:aws:iam::03XXXXXXXXX:user/developer'
// }]
// }
//}
Typescript
import { Aws, Options } from 'aws-cli-js';
const options = new Options(
/* accessKey */ 'your key',
/* secretKey */ 'your key2',
/* sessionToken */ 'your token',
/* currentWorkingDirectory */ null
);
const aws = new Aws(options);
return aws.command('iam list-users').then(function (data) {
console.log('data = ', data);
});
awsCli.command('ec2 describe-instances --instance-ids i-789b3ba7').then(function (data) {
console.log('data = ', data);
});
//data = { command: 'aws ec2 describe-instances --instance-ids i-789b3ba7 ',
// raw: '{\\n \\"Reservations\\": [\\n {\\n \\"OwnerId\\": \\"031641171132\\", \\n \\"ReservationId\\": \\"r-a48ad878\\", \\n \\"Groups\\": [], \\n \\"Instances\\": [\\n {\\n
// \\"Monitoring\\": {\\n \\"State\\": \\"disabled\\"\\n }, \\n
// \\"PublicDnsName\\": \\"ec2-52-64-166-221.ap-southeast-2.compute.amazonaws.com\\", \\n \\"State\\": {\\n
// ...
MIT
FAQs
A node.js wrapper for the aws command line interface
The npm package aws-cli-js receives a total of 2,654 weekly downloads. As such, aws-cli-js popularity was classified as popular.
We found that aws-cli-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.