Skip to content

(apigatewayv2): support for mock integration type #15008

@lyraddigital

Description

@lyraddigital

Currently in the @aws-cdk/aws-apigatewayv2 library only one WebSocketIntegrationType is supported. The AWS_PROXY integration type. The @aws-cdk/aws-apigatewayv2-integrations also only supports the LambdaWebSocketIntegration class to help connect a particular route to a Lambda function.

However when I create a Websocket API in the AWS console, there is support for HTTP, Mock, AWS Service and VPC Link.

I have created a simple Websocket API that does not require the client to communicate to the server. Only the server to communicate to the client. Therefore my $default route just has a simple MOCK integration, which works for my scenario.

Can we please add the other integrations type into this library? I am happy to assist if this is not already in progress. Just let me know.

Use Case

The reason for this requirement is because I'm using API Gateway to create a web socket server that talks to both a Twitch Bot and a React.js application which is hosted on my local machine and runs inside of OBS. Basically this is a requirement for a Twitch app I am creating. I could try another option (EC2 / ECS), AWS AppSync or event IOT, but in my research I believe using API Gateway and Lambda is the cheapest option.

Proposed Solution

Not much to propose. Just make it work similar to how the UI works now.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-apigatewayRelated to Amazon API Gatewayeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions