@vendia/serverless-express
Advanced tools
Comparing version 4.6.0 to 4.7.0
{ | ||
"name": "@vendia/serverless-express", | ||
"version": "4.6.0", | ||
"version": "4.7.0", | ||
"description": "This library enables you to utilize AWS Lambda and Amazon API Gateway to respond to web and API requests using your existing Node.js application framework.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -175,4 +175,5 @@ # Serverless Express by [Vendia](https://vendia.net/) | ||
A single function can be configured to handle additional kinds of AWS events: | ||
- SNS | ||
- DynamoDB Streams | ||
- SNS | ||
- DynamoDB Streams | ||
- SQS | ||
- EventBridge Events (formerlly CloudWatch Events) | ||
@@ -195,2 +196,4 @@ | ||
arn: arn:aws:dynamodb:us-east-1:012345678990:table/my-table/stream/2021-07-15T15:05:51.683 | ||
- sqs: | ||
arn: arn:aws:sqs:us-east-1:012345678990:myQueue | ||
- eventBridge: | ||
@@ -210,2 +213,3 @@ pattern: | ||
'AWS_DYNAMODB': '/dynamodb', | ||
'AWS_SQS': '/sqs' | ||
'AWS_EVENTBRIDGE': '/eventbridge', | ||
@@ -232,6 +236,8 @@ } | ||
- SNS: `sns.amazonaws.com` | ||
- DynamoDB: `dynamodb.amazonaws.com` | ||
- EventBridge: `events.amazonaws.com` | ||
- SNS: `sns.amazonaws.com` | ||
- DynamoDB: `dynamodb.amazonaws.com` | ||
- SQS: `sqs.amazonaws.com` | ||
- EventBridge: `events.amazonaws.com` | ||
### logSettings | ||
@@ -238,0 +244,0 @@ |
@@ -6,3 +6,3 @@ import { RequestListener } from "http"; | ||
type EventSources = "AWS_SNS" | "AWS_DYNAMODB" | "AWS_EVENTBRIDGE"; | ||
type EventSources = "AWS_SNS" | "AWS_DYNAMODB" | "AWS_EVENTBRIDGE" | "AWS_SQS"; | ||
@@ -9,0 +9,0 @@ interface EventSource { |
@@ -6,2 +6,3 @@ const awsApiGatewayV1EventSource = require('./aws/api-gateway-v1') | ||
const awsSnsEventSource = require('./aws/sns') | ||
const awsSqsEventSource = require('./aws/sqs') | ||
const awsDynamoDbEventSource = require('./aws/dynamodb') | ||
@@ -24,2 +25,4 @@ const awsEventBridgeEventSource = require('./aws/eventbridge') | ||
return awsSnsEventSource | ||
case 'AWS_SQS': | ||
return awsSqsEventSource | ||
case 'AWS_EVENTBRIDGE': | ||
@@ -26,0 +29,0 @@ return awsEventBridgeEventSource |
@@ -82,2 +82,5 @@ const url = require('url') | ||
} | ||
if (eventSource === 'aws:sqs') { | ||
return 'AWS_SQS' | ||
} | ||
return 'AWS_LAMBDA_EDGE' | ||
@@ -84,0 +87,0 @@ } |
61610
37
1146
312