1 Answer
- Newest
- Most votes
- Most comments
0
Figured it out. You have to use HttpRoute to do this as described here. You don't addRoutes()
you just create it. The main difference is that you need to do this once for every method.
In my case, I pass in an array of methods, then add then one at a time:
methods.forEach( (method) => {
const routeId = id + "-" + method.toLowerCase();
new HttpRoute(this.stack, routeId, {
httpApi: this.api,
routeKey: HttpRouteKey.with(props.path, method),
integration: httpIntegration,
authorizer: this.authorizer
});
});
answered a year ago
Relevant content
- Accepted Answerasked 3 years ago
- Accepted Answerasked 3 months ago
- Accepted Answerasked 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago