This message was deleted.
# typescript
s
This message was deleted.
f
I expect you’ll get the same error, but can you try:
Copy code
return new API(name, {
        routes: [
            {
                path: "/",
                target: {
            uri: "arn:aws:apigateway:eu-central-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-central-1:051069080387:function:deploy-test-4-lambda/invocations",
            type: "aws_proxy",
        },
        ],
        stageName: name + "-stage"
    }, { provider });
Also to ensure the right format you could call
getFunction
and use the
invokeArn
property from the result to input into the API gateway integration route. See: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/lambda/#GetFunctionResult-invokeArn
m
thank you Dan, yes, that's where I got it from
f
This looks like an improvement that can be made to the awsx package. I’ve documented it here: https://github.com/pulumi/pulumi-awsx/issues/534. In the meantime, I’d recommend trying out the resources in the raw aws package here: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/apigateway/#RestApiArgs. This will align 1:1 with what you’d expect in the AWS console.
m
okay, thanks, I will do that