bitter-france-47214
06/26/2022, 11:00 AMapigateway.RestAPi
using OpenAPI but do not rely on the x-amazon-apigateway-integration
that is used within the OpenApi spec?
Why I want this?
Since the spec is JSON ARN and other has to be hardcoded, so I loose the advantage of referring to a lambda (const myLambda = aws.lambda.Function
) defined with pulumi as code.little-cartoon-10569
07/29/2022, 7:07 AMbitter-france-47214
07/29/2022, 7:20 AMhelloHandler
as a const
(no ARN / URI)
{
path: "/",
method: "GET",
eventHandler: helloHandler,
},
That of course do not work when I am defining my api in JSON with OpenAPI.
So to connect my endpoints with a lambda, it is suggested to use x-amazon-apigateway-integration
.
But when I use that, and correct me if I am wrong, I need to connect endpoint and a specific lambda via the arn/uri (not sure which, still a beginner) that I have to look after creating my helloHandler
lambda using pulumi.
For me, it would be more efficient if I could connect them directly using helloHandler
as a reference to my lambda.
Thus, my question is, if there is a way to connect my endpoint defined in my OpenAPI Json with my helloHandler
lambda without manually copy/pasting the arn/uri of that lambda into the json using x-amazon-apigateway-integration
?
Thanks a lot in advance!
Thuslittle-cartoon-10569
07/29/2022, 7:57 AM