aws-apigatewayv2websocket-sqs
Reference Documentation: | https://docs.aws.amazon.com/solutions/latest/constructs/ |
Language | Package |
---|---|
|
|
|
|
|
|
Overview
This AWS Solutions Construct implements an Amazon API Gateway WebSocket connected to an Amazon SQS queue pattern.
Here is a minimal deployable pattern definition:
Pattern Construct Props
Name | Type | Description |
---|---|---|
existingWebSocketApi? |
Optional API Gateway WebSocket instance. Providing both existingWebSocketApi and webSocketApiProps will cause an error. |
|
webSocketApiProps? |
Optional user-provided props to override the default props for the API Gateway. Providing both existingWebSocketApi and webSocketApiProps will cause an error. |
|
queueProps? |
Optional user-provided props to override the default props for the queue. Providing both existingQueueObj and queueProps will cause an error. |
|
existingQueueObj? |
Optional existing instance of SQS Queue. Providing both existingQueueObj and queueProps will cause an error. |
|
deployDeadLetterQueue? |
|
Whether to deploy a secondary queue
to be used as a dead letter queue. Defaults to |
deadLetterQueueProps? |
Optional properties to use for creating dead letter queue. Note that if you are creating a FIFO Queue, the dead letter queue should also be FIFO. |
|
maxReceiveCount |
|
The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. |
createDefaultRoute? |
|
Whether to create a default route. At
least one of createDefaultRoute or customRouteName must be provided. If
set to true, then it will use the value supplied with
|
defaultRouteRequestTemplate? |
|
Optional user provided
API Gateway Request Template for the default route and/ or customRoute
(if customRouteName is provided). This property will only be used if
createDefaultRoute is |
defaultIamAuthorization? |
|
Add IAM authorization to the connect$ path by default. Only set this to false if: 1) If plan to provide an authorizer with the |
customRouteName? |
|
The name of the route that will be sent through WebSocketApiProps.routeSelectionExpression when invoking the WebSocket endpoint. At least one of createDefaultRoute or customRouteName must be provided. Default - None |
Pattern Properties
Name | Type | Description |
---|---|---|
webSocketApi |
Returns an instance of the API Gateway WebSocket API created by the pattern. |
|
apiGatewayRole |
Returns an instance of the iam.Role created by the construct for API Gateway. |
|
webSocketStage |
Returns an instance of the WebSocketStage created by the construct. |
|
apiGatewayLogGroup |
Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch. |
|
sqsQueue |
Returns an instance of the SQS queue created by the pattern. |
|
deadLetterQueue? |
Returns an instance of the DeadLetterQueue created by the pattern. |
Default settings
Out of the box implementation of the Construct without any override will set the following defaults:
Amazon API Gateway
-
Deploy a WebSocket endpoint
-
Enable CloudWatch logging for API Gateway
-
Configure least privilege access IAM role for API Gateway
-
Enable X-Ray Tracing
Amazon SQS Queue
-
Deploy SQS dead-letter queue for the source SQS Queue
-
Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
-
Enforce encryption of data in transit
Architecture

Github
Go to the Github repo