Is there a way to setup a http proxy with `sst.Api...
# help
d
Is there a way to setup a http proxy with
sst.ApiGatewayV1Api
like you can with
sst.Api
?
@thdxr Is this just a miss in the sst construct ? Because we can do this directly in the APIG Console.
t
I'm not super familiar with ApiGatewayV1 but it's likely just a miss. I remember we added proxy from sst.Api from a user request
can make an issue for this if you need it
f
Yeah, we’ve been adding integration support on request. ie. recently added ALB and HTTP Proxy support for
Api
.
d
I could be wrong but I think v2 does NOT do REST API. So you can’t do things like mapping templates/response transforms
Our need is to simply proxy all requests to an endpoint but be able to transform the response based on auth role (JWT) using velocity templates
@Frank so this feels like it needs to be made to
ApiGatewayV1Api
as its not possible with
Api
, no?
Also…. from the sst docs it shows the use of
HttpJwtAuthorizer
in a
ApiGatewayV1Api
. But that comes from
@aws-cdk/aws-apigatewayv2-authorizers
which is v2, are we sure that example code works? I’m getting an error.
f
Hey @Dan Van Brunt, yeah request/response mapping is not support in v2.
You are totally right,
HttpJwtAuthorizer
is v2 specific. Just updated the doc.