New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@alpha-lambda/aws-drivers

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alpha-lambda/aws-drivers - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

lib/ajv.js

4

index.js
'use strict';
const S3 = require('./lib/s3');
const SQS = require('./lib/sqs');
module.exports = {
S3
S3,
SQS
};
'use strict';
const assert = require('assert');
const AWS = require('aws-sdk');
const logMeGently = require('@alpha-lambda/log-me-gently');

@@ -18,3 +17,3 @@

this._client = new AWS[service](clientOptions);
this._client = new service(clientOptions); // eslint-disable-line new-cap
}

@@ -21,0 +20,0 @@

'use strict';
const assert = require('assert');
const AWS = require('aws-sdk');
const uuid = require('uuid');

@@ -15,6 +16,7 @@

};
super('S3', clientOpts, options);
super(AWS.S3, clientOpts, options);
}
getSignedUrl(context, { operation, parameters, urlTTL }) {
assert(context, 'missing context');
assert(operation, 'missing operation');

@@ -54,2 +56,3 @@ assert(urlTTL !== undefined, 'missing urlTTL');

putObject(context, { bucket, data, key }) {
assert(context, 'missing context');
assert(bucket, 'missing bucket');

@@ -56,0 +59,0 @@ assert(data, 'missing data');

{
"name": "@alpha-lambda/aws-drivers",
"version": "1.0.1",
"version": "1.1.0",
"description": "Wrappers for AWS SDK services that make life easier (sometimes)",

@@ -51,4 +51,7 @@ "repository": {

"@alpha-lambda/log-me-gently": "^1.0.0",
"ajv": "^6.10.0",
"lodash.chunk": "^4.2.0",
"throat": "^5.0.0",
"uuid": "^3.3.2"
}
}

@@ -36,2 +36,43 @@ # aws-drivers

### SQS
Additional config properties:
- **[maxConcurrency]** - { Number } - max number of concurrent AWS API calls [defaults to `Infinity`]
#### parse(context, input)
Validates and parses input, where input can be SQS message or SQS event. Sample output:
```json
[
{
"body": {
"foo": "foo",
"bar": "bar"
},
"messageAttributes": {
"baz": 12345
},
"messageId": 1234567890
}
]
```
#### send(context, queueUrl, messages)
Sends messages to the specified queue using batch API to reduce number of calls.
- **queueUrl** - { String } - the URL of the SQS queue to which batched messages are sent
- **messages** - { Any | Any[] } - messages to be sent
#### sendToDLQ(context, dlqUrl, items)
Formats and sends messages to the specified deadletter queue.
- **dlqUrl** - { String } - the deadletter queue URL to which messages are sent
- **items** - { Object | Object[] } - items to send to the deadletter queue, where:
- **event** - { Any } - original payload that can't be processed
- **error** - { Object } - error that occured during processing
These message attributes are added to each message:
- **err.message** - error message
- **err.stack** - error stack trace
- **context.awsRequestId** - requestId for the current request, provided by Amazon
- **origin.messageId** - original messageId (if payload is SQS message)
## License

@@ -38,0 +79,0 @@

Sorry, the diff of this file is too big to display

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