Reputation: 1279
When creating a route in an HTTP (not REST) API Gateway API, I'm able to require IAM authorization from either the console or the CLI.
I can't figure out how to do this from CDK. The authorizer
parameter wants an IHttpRouteAuthorizer
, and the only implementations I see are HttpJwtAuthorizer
, HttpLambdaAuthorizer
, HttpUserPoolAuthorizer
, HttpNoneAuthorizer
, none of which seem to correspond to simple IAM authorization.
What do I need to do to configure a route to use IAM authorization from CDK?
Upvotes: 2
Views: 2944
Reputation: 61
Regarding the previous post (I am new, and lack the reputation points to comment directly)
Update (26 Dec 2021): HttpIamAuthorizer is now available from versions 1.137.0 and 2.3.0 on.
Unfortunately, something went wrong with the CDK release mechanism. See https://github.com/aws/aws-cdk/issues/18138 for details. HttpIamAuthorizer
is not available in version 2.3.0.
Upvotes: 3
Reputation: 1572
The HTTP API is still experimental in CDK. Not all features are there yet.
That said, the HttpIamAuthorizer
is under development at the moment and is very close to getting merged.
Update (26 Dec 2021): HttpIamAuthorizer
is now available from versions 1.137.0 and 2.3.0 on.
Upvotes: 3