How can add an integration with an AWS service for...
# help
ö
How can add an integration with an AWS service for my API Gateway? (instead of Lambda integration)?
Copy code
const api = new sst.Api(this, "Api", {
                  routes: {
                        "POST /": {
                              // @ts-expect-error
                              permissions: [[ev, 'grantPutEventsTo']],
                              handler: "src/lambda.handler",
                        }
                  }
            });
m
You have to use CfnIntegration and CfnRoute. Your integration type is
AWS_PROXY
and the Integration subtype is service-subtype. For example:
Copy code
integrationType: 'AWS_PROXY',
integrationSubtype: 'StepFunctions-StartSyncExecution',
ö
🤔
f
@Ömer Toraman we are waiting for CDK to add high level support for this https://github.com/aws/aws-cdk/pull/16287
In the mean while, you’d have to use the low level
Cfn*
constructs to piece together the CloudFormation code as @Mike McCall suggested.