-
Notifications
You must be signed in to change notification settings - Fork 2.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
HttpApi circular dependency between RouteSettings and Route #2479
Comments
Some additional thoughts regarding the desired behavior here:
If all of the route's properties could be provided in the |
@brcarp What happens if you switch to specifying this through OpenApi? This should fix the circular dependencies and the nondeterministic behavior of ApiGateway. |
@jfuss is that documented anywhere? I didn't know that was considered unsupported behavior.
I actually had a LOT of difficulty trying to set up an HTTP proxy integration with a VPC Link using OpenApi. If you have any working examples of that to share, I'd be interested to see them. In my experimentation, I could not get this to work with VPC Links and a proxy path variable ( |
@brcarp This has come up before in the repo. Here is a previous response: #1971 (comment) I would have to check/search if Api Gateway updated their docs. At the very least, we should have it on our docs as well. I either can't find it or needs to be added. Will take that up internally.
I do not off hand. I would have to create one myself. Have you looked at https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-api-with-vpclink-using-swagger.html? Seems like what you are looking for but not totally sure. |
@jfuss Yeah that's useful for the VPC Link, but I think my actual issue was with using I was unable to get that aspect of it to work properly, but it may be because I was experimenting in the dark without any relevant documentation. |
For what it's worth, I recall trying to follow the model in the article Set up a proxy resource with Lambda proxy integration and Set up HTTP integrations in API Gateway, but finding that it did not work correctly for |
It's possible that I just didn't iterate on it enough, but my recollection is that I just wasn't able to get it to work. If it has been proven out, it would be nice to add an OpenAPI example to Working with HTTP proxy integrations for HTTP APIs. |
Description:
When creating HTTP API and Stage resources for the first time using
AWS::Serverless::HttpApi
, addingRouteSettings
will fail for routes that you may be creating at the same time. (You cannot create the Route resource ahead of time because it needs to belong to the API that you are creating.) The circular dependency can be resolved by first creating theHttpApi
along with a definedRoute
resource, and then doing a subsequent update to addRouteSettings
that will match it to existing routes, but this is inefficient and not a golden path.Steps to reproduce:
Example template snippet:
Observed result:
The
AWS::ApiGatewayV2::Stage
resource results in aCREATE_FAILED
in CloudFormation with the following error:Expected result:
The expectation is that the SAM deploy can create the API, Stage and Route together in a single deployment, resolving the circular dependency of the Route needing to exist before the Stage's
RouteSettings
can be applied.Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
:FROM public.ecr.aws/sam/build-nodejs14.x:latest
(should be1.55.0
)us-east-1
The text was updated successfully, but these errors were encountered: