Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cumulus/aws-client

Package Overview
Dependencies
Maintainers
8
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cumulus/aws-client - npm Package Compare versions

Comparing version 1.18.0 to 1.18.1-alpha.0

cumulus-aws-client-1.18.1-alpha.0.tgz

13

DynamoDb.js

@@ -146,6 +146,19 @@ 'use strict';

/**
* Delete a DynamoDB table and then wait for the table to not exist
*
* @param {Object} params - the same params that you would pass to AWS.deleteTable
* See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#deleteTable-property
* @returns {Promise}
*/
async function deleteAndWaitForDynamoDbTableNotExists(params) {
await awsServices.dynamodb().deleteTable(params).promise();
return awsServices.dynamodb().waitFor('tableNotExists', { TableName: params.TableName }).promise();
}
module.exports = {
createAndWaitForDynamoDbTable,
deleteAndWaitForDynamoDbTableNotExists,
get,
scan
};

5

package.json
{
"name": "@cumulus/aws-client",
"version": "1.18.0",
"version": "1.18.1-alpha.0",
"description": "Utilities for working with AWS",

@@ -63,4 +63,3 @@ "keywords": [

"sinon": "^8.0.4"
},
"gitHead": "f55107a043f48e9d54cfc7050f0dd4cc8c65f649"
}
}

21

S3.js

@@ -274,6 +274,23 @@ const fs = require('fs');

exports.getJsonS3Object = (bucket, key) =>
/**
* Fetch the contents of an S3 object
*
* @param {string} bucket - the S3 object's bucket
* @param {string} key - the S3 object's key
* @returns {Promise<string>} the contents of the S3 object
*/
exports.getTextObject = (bucket, key) =>
exports.getS3Object(bucket, key)
.then(({ Body }) => JSON.parse(Body.toString()));
.then(({ Body }) => Body.toString());
/**
* Fetch JSON stored in an S3 object
* @param {string} bucket - the S3 object's bucket
* @param {string} key - the S3 object's key
* @returns {Promise<*>} the contents of the S3 object, parsed as JSON
*/
exports.getJsonS3Object = (bucket, key) =>
exports.getTextObject(bucket, key)
.then(JSON.parse);
exports.putJsonS3Object = (bucket, key, data) =>

@@ -280,0 +297,0 @@ exports.s3PutObject({

@@ -21,2 +21,3 @@ const AWS = require('aws-sdk');

exports.secretsManager = awsClient(AWS.SecretsManager, '2017-10-17');
exports.kms = awsClient(AWS.KMS, '2014-11-01');
exports.es = awsClient(AWS.ES, '2015-01-01');

@@ -82,2 +82,3 @@ /* eslint no-console: "off" */

kinesis: 4568,
kms: 4599,
lambda: 4574,

@@ -84,0 +85,0 @@ redshift: 4577,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc