Skip to content

Commit 89f4f86

Browse files
fix(apigatewayv2): trigger on websocket connect and disconnect is not working (#27732)
Closes #19532 Lambda integrations for `$connect` and `$disconnect` routes were previously broken. Users would see this error message in the Lambda console: ![160185676-15ba5704-a7ba-49ef-b457-bb3f89094de6](https://github.com/aws/aws-cdk/assets/35242245/0938239a-b4f1-440d-9868-86ce3d213386) Fixing the path by removing the extra `*/` from the [code of the Lambda integration](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-apigatewayv2-integrations-alpha/lib/websocket/lambda.ts#L36) that adds permission, we no longer see that error message in the Lambda console as the path is now correct: <img width="973" alt="Screenshot 2023-10-27 at 2 58 11 PM" src="https://github.com/aws/aws-cdk/assets/35242245/c5a8f1f6-4e51-4533-880e-3c5f400cc59e"> I could not manage to figure out how to verify this change via an Integration test assertion. However, I added a new integration test file for Lambda `$connect` and `$disconnect` integrations on a `WebSocketApi`. The attached screenshots above also verify that this change works when I manually run it locally. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 93c6a9a commit 89f4f86

File tree

30 files changed

+1915
-124
lines changed

30 files changed

+1915
-124
lines changed

packages/@aws-cdk/aws-apigatewayv2-authorizers-alpha/test/http/integ.lambda.js.snapshot/tree.json

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)