https://pulumi.com logo
m

magnificent-accountant-19074

05/05/2020, 6:54 PM
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

magnificent-accountant-19074

05/06/2020, 6:50 AM
@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

faint-table-42725

05/06/2020, 4:08 PM
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

magnificent-accountant-19074

05/07/2020, 3:31 PM
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