Hello Everyone, I have a question - when I have `a...
# typescript
m
Hello Everyone, I have a question - when I have
aws.lambda.Alias
how can I wire it up with
API
? I was not able to find any documentation on this.
You can hook up the
invokeArn
to the
uri
that an integration expects: https://www.pulumi.com/docs/reference/pkg/aws/apigateway/integration/
m
@faint-table-42725 Thanks for your help, one more question: is there a way to use that simple notation with routes?
Copy code
new API(name, {
        routes: [
            {
                path: "/",
                method: "ANY",
                eventHandler: lambda,
            },
            {
                path: "/{proxy+}",
                method: "ANY",
                eventHandler: lambda
            }],
    });
When I use the code above, the trigger is not created
f
I presume you’re using
awsx
then? In which case, instead of using
eventHandler
for the route, you’ll want to take a look at using an integration target: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/awsx/apigateway/#IntegrationRouteTargetProvider
m
I found this https://github.com/pulumi/pulumi-awsx/issues/184 but is there any documentation/example how to wire it up?
Thanks for helping, I'm trying to wrap my head around how it should be used but some docs/examples would help a lot