Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@voodoo.io/aws-utils
Advanced tools
Simple wrapper around aws-sdk to make it easier to use.
/!\ This module use async/await syntax, this is why you must have node 7.6+.
Supported and tested : >= 7.6
Version | Supported | Tested |
---|---|---|
10.x | yes | yes |
9.x | yes | yes |
8.x | yes | yes |
>= 7.6 | yes | yes |
BREAKING CHANGES since version 2.0
Now dynamo tools returns an object and not directly an array of items.
{
Items:[ { ....} , { ... } ],
LastEvaluatedKey: {....}
}
$ npm install @voodoo.io/aws-utils --save
const awsUtils = require('@voodoo.io/aws-utils').dynamo;
const aws = require('aws-sdk');
aws.config.update({region: 'eu-west-1'});
const dynamoCli = new aws.DynamoDB.DocumentClient();
const dynamoTools = new awsUtils(dynamoCli)
const res = await dynamoTools.queryHashKey('myTable', 'key', 'value');
const res = await dynamoTools.scan('myTable');
const res = await dynamoTools.putItem('myTable', {'key': 'value'});
const res = await dynamoTools.deleteItem('myTable', {'key': 'value'});
dynamoTable
: table's namehashKeyName
: hashkey's namehashKeyValue
: hashkey's valueexclusiveStartKey
: (optional) start search at a specific keylimit
: (optional) don't return more items than the limitdynamoTable
: table's nameitem
: item to insertdynamoTable
: table's namehashKeyName
: (optional) hashkey's namehashKeyValue
: (optional) hashkey's valueexclusiveStartKey
: (optional) start search at a specific keylimit
: (optional) don't return more items than the limitIf no hashkey is provided it returns the full table.
dynamoTable
: table's namekey
: hashkey to deleteconst awsUtils = require('@voodoo.io/aws-utils').secretManager;
const aws = require('aws-sdk');
aws.config.update({region: 'eu-west-1'});
const cli = new aws.SecretsManager({});
const secretManagerTools = new awsUtils(cli);
const res = await secretManagerTools.getSecretValue('secret');
secret
: secret's idconst awsUtils = require('@voodoo.io/aws-utils').s3;
const aws = require('aws-sdk');
aws.config.update({region: 'eu-west-1'});
const cli = new aws.S3();
const s3Tools = new awsUtils(cli);
const res = await s3Tools.getObject('bucket', 'key');
bucket
: bucket's namekey
: path to the ressource (/path/file.json)const res = await s3Tools.putJsonObject('bucket', 'key', {"key": "value"});
bucket
: bucket's namekey
: path to the ressource (/path/file.json)item
: json object to save on S3const res = await s3Tools.emptyS3Directory('bucket', 'dir/');
bucket
: bucket's namedir
: directory to remove$ npm test
Coverage report can be found in coverage/.
FAQs
AWS utils methods - using homemade retry system
The npm package @voodoo.io/aws-utils receives a total of 259 weekly downloads. As such, @voodoo.io/aws-utils popularity was classified as not popular.
We found that @voodoo.io/aws-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.