I’m trying to use AWS API Gateway with a custom au...
# general
c
I’m trying to use AWS API Gateway with a custom authorizer lambda, and it looks like the authorizer needs to be attached to each method / path defined - I don’t need a way in the AWS docs to use the authorizer for all routes. I was wondering if Pulumi intended to offer anything here to make this easier. I’d have to stop using the pulumi-cloud abstraction otherwise, which would be sad since I like how it works.
w
Curious - Are you using
cloud.HttpServer
or
cloud.API
here? We don’t currently have any custom authorized support in those, and we’re not sure yet how best to add them in a form that can make sense cross cloud - but something we’re thinking about. We may well be able to add this more easily in the new
aws.apigateway.x.API
which offers a simpler way to build API Gateways specifically, but can more easily expose all the bells and whistles (though it does not yet). Cc also @lemon-spoon-91807
c
Well…I’m using
cloud.API
from
@pulumi/cloud-aws
, only I hacked it to expose the
RestApi
so I could add the authorizer lambda. I think the current
master
makes those hacks unnecessary though. I still need to be able to attached the authorizer to the methods / routes however.
l
@cool-helicopter-70130 Let us know how it goes!