Amazon.CDK.AWS.Apigatewayv2.Alpha: Support "AWS" as the IntegrationType for WebSockets #27164
Closed
1 of 2 tasks
Labels
@aws-cdk/aws-apigatewayv2
Related to Amazon API Gateway v2
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
good first issue
Related to contributions. See CONTRIBUTING.md
p1
Describe the feature
Currently,
Amazon.CDK.AWS.Apigatewayv2.Alpha
lacks support forAWS
option as the IntegrationType for WebSocket Apigateway.The quote from the documentation:
The important part is:
That is, you can create a WebSocket Apigateway that calls directly other AWS services without a Lambda function middleware.
Use Case
Ability to create a CDK for WebSocket Apigateway where I can define a direct integration to another AWS service.
For example, WebSocket route integration that triggers a AWS Step Function directly.
This use case is supported using CloudFormation and SAM as follows:
Proposed Solution
From dotnet world, the solution requires the creation of another class that inherits from
WebSocketRouteIntegration
to expose the specific props needed for IntegrationType as AWS.I propose a class named
WebSocketAwsIntegration
, following the convention for the other integrations types already implemented: WebSocketMockIntegration, WebSocketLambdaIntegration.Alternatively, we could be even more specific and create classes such as
WebSocketStepFunctionIntegration
, however, this would require considerably more work because we would need to create several classes for every AWS service that is supported with this construct.In any case, this would require the following changes - looking briefly at the code:
WebSocketRouteIntegrationConfig
Adding the following missing properties: IntegrationMethod, RequestTemplates, CredentialsArn, TemplateSelectionExpression, and probably others depending on the AWS service you want to integrate.
WebSocketIntegrationType
Adding the following option to the enum:
AWS
.Other Information
No response
Acknowledgements
CDK version used
v2
Environment details (OS name and version, etc.)
Windows 11
The text was updated successfully, but these errors were encountered: