Created
March 2, 2023 01:22
-
-
Save metaskills/6862c2f878800d3e6b32dd72ef4e2717 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DisconnectWSLambda: | |
Type: AWS::Serverless::Function | |
Properties: | |
Handler: index.handler | |
CodeUri: "/var/task/src/ws/disconnect" | |
Runtime: nodejs16.x | |
Architectures: | |
- x86_64 | |
MemorySize: 1152 | |
DisconnectWSRoute: | |
Type: AWS::ApiGatewayV2::Route | |
Properties: | |
ApiId: | |
Ref: WS | |
RouteKey: "$disconnect" | |
OperationName: DisconnectWSRoute | |
Target: | |
Fn::Join: | |
- "/" | |
- - integrations | |
- Ref: DisconnectWSIntegration | |
DisconnectWSIntegration: | |
Type: AWS::ApiGatewayV2::Integration | |
Properties: | |
ApiId: | |
Ref: WS | |
IntegrationType: AWS_PROXY | |
IntegrationUri: | |
Fn::Sub: | |
- arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${DisconnectWSLambda.Arn}/invocations | |
- {} | |
DisconnectWSPermission: | |
Type: AWS::Lambda::Permission | |
DependsOn: | |
- WS | |
- DisconnectWSLambda | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Ref: DisconnectWSLambda | |
Principal: apigateway.amazonaws.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment