Provide SST construct for API Gateway "Integration"

Continuing the discussion from Mapping Cognito Identity Id and User Pool Id:

Given the use case in the cited comment above, it would be extremely helpful to provide a construct feature in the Api construct to provide Integrations for endpoint methods. I would expect this to be either a feature in the SST constructs directly or, a ‘pass-through’ feature to CDK to do this.

As an example, I would expect it to work like this in my ApiStack.js file.

const api = new Api(stack, “Api”, {

routes: {
“GET /notes/{id}”: “functions/get.main”,
“POST /notes”: {
function: “functions/create.main”,
cdk: {
integration: {
parameterMapping: new ParameterMapping().overwriteHeader(“sub”, MappingValue.contextVariable(“$context.identity.cognitoAuthenticationProvider”))

}

Can you provide this or some kind of CDK hook? Nice ‘create sst’ stream today BTW.