-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining Resources on imported RestApi Error on LambdaIntegration #8679
Labels
Comments
@nija-at Can you please take a look? ^ |
Thanks for reporting this bug. I don't think there are any workarounds for this. |
Thanks @nija-at . Counting on you for this one. |
nija-at
pushed a commit
that referenced
this issue
Jun 29, 2020
Root cause here was that `LambdaIntegration` used the deprecated `restApi` property on its binding Method. This property does not work on imported RestApi and has been superceded by the property `api`. A further bug that was discovered was that the API `methodArn()` on the Method construct did not work on imported RestApi. This has been fixed up such that if a `deploymentStage` is not defined for the imported RestApi, the ARN will return '*' as its stage (shorthand for 'all stages'). fixes #8679
nija-at
pushed a commit
that referenced
this issue
Jun 29, 2020
Root cause here was that `LambdaIntegration` used the deprecated `restApi` property on its binding Method. This property does not work on imported RestApi and has been superceded by the property `api`. A further bug that was discovered was that the API `methodArn()` on the Method construct did not work on imported RestApi. This has been fixed up such that if a `deploymentStage` is not defined for the imported RestApi, the ARN will return '*' as its stage (shorthand for 'all stages'). fixes #8679
nija-at
pushed a commit
that referenced
this issue
Jun 29, 2020
Root cause here was that `LambdaIntegration` used the deprecated `restApi` property on its binding Method. This property does not work on imported RestApi and has been superceded by the property `api`. A further bug that was discovered was that the API `methodArn()` on the Method construct did not work on imported RestApi. This has been fixed up such that if a `deploymentStage` is not defined for the imported RestApi, the ARN will return '*' as its stage (shorthand for 'all stages'). fixes #8679
I've posted a fix for this here - #8785 |
mergify bot
pushed a commit
that referenced
this issue
Jun 29, 2020
#8785) Root cause here was that `LambdaIntegration` used the deprecated `restApi` property on its binding Method. This property does not work on imported RestApi and has been superceded by the property `api`. A further bug that was discovered was that the API `methodArn()` on the Method construct did not work on imported RestApi. This has been fixed up such that if a `deploymentStage` is not defined for the imported RestApi, the ARN will return '*' as its stage (shorthand for 'all stages'). fixes #8679 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
whimzyLive
pushed a commit
to whimzyLive/aws-cdk
that referenced
this issue
Jul 1, 2020
aws#8785) Root cause here was that `LambdaIntegration` used the deprecated `restApi` property on its binding Method. This property does not work on imported RestApi and has been superceded by the property `api`. A further bug that was discovered was that the API `methodArn()` on the Method construct did not work on imported RestApi. This has been fixed up such that if a `deploymentStage` is not defined for the imported RestApi, the ARN will return '*' as its stage (shorthand for 'all stages'). fixes aws#8679 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
When we try to use the imported RestApi Gateway to define resources across stacks, it is not allowing to add new LambdaIntegration on the imported Gateway. However it work with MockIntegration as expected.
The following error is thrown on synth or deployment:
RestApi is not available on Resource not connected to an instance of RestApi. Use
apiinstead
This works:
This doesn't:
PS: From the repo code it is clear that "restApi throws an error on imported while api returns correctly".
When we use LambdaIntegration, it intrinsically calls ${method.restApi.node.uniqueId} which will throw an error for imported gateway. Workarounds?
The text was updated successfully, but these errors were encountered: