question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(aws_cdk.aws_apigatewayv2_integrations.LambdaWebSocketIntegration): produces wrong integration_uri

See original GitHub issue

LambdaWebSocketIntegration (per the example here) seems designed to plug a lambda handler into a WebSocket API Gateway. But it produces the wrong IntegrationUri.

Reproduction Steps

see example here

What did you expect to happen?

Expected a working API Gateway.

What actually happened?

Ended up with a broken API Gateway because the generated IntegrationUri is wrong.

Environment

  • CDK CLI Version : 1.94.1 (build 60d8f91)
  • Framework Version:
  • Node.js Version:
  • OS :
  • Language (Version):

Other

The IntegrationUri produced is

            "IntegrationUri": "arn:aws:lambda:us-east-2:$$ACCOUNT ID redacted$$:function:sampleContainerFunction",

but a correct one would be

            "IntegrationUri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:$$ACCOUNT ID redacted$$:function:sampleContainerFunction/invocations",

For documentation on this “invocations” format for the IntegrationUri, please see this doc.

The correct AWS CLI command create-integration shows the format:

aws apigatewayv2 create-integration --api-id aabbccddee --integration-type AWS_PROXY --integration-method POST --integration-uri arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123412341234:function:simpleproxy-echo-e2e/invocations

This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nija-atcommented, Mar 26, 2021
0reactions
github-actions[bot]commented, May 6, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/aws-apigatewayv2-integrations module
WebSocket APIs. WebSocket integrations connect a route to backend resources. The following integrations are supported in the CDK. Lambda WebSocket Integration.
Read more >
@aws-cdk/aws-apigatewayv2 | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
aws-cdk.aws-apigatewayv2-integrations - PyPI
WebSocket APIs. WebSocket integrations connect a route to backend resources. The following integrations are supported in the CDK. Lambda WebSocket Integration.
Read more >
Property 'LambdaProxyIntegration' does not exist on type 'typeof'
Git commit: https://github.com/aws/aws-cdk/commit/29039e8bd13a4fdb7f84254038b3331c179273fd Check you packages versions and try to change it ...
Read more >
AWS CDK and Typescript: Using the new ApiGatewayV2
Learn how to migrate your existing AWS API Gateway to API Gateway V2 with AWS Lambda integration using the AWS CDK and Typescript....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found