How to specify own Mapping Templates in Integration Request for AWS ApiGateway?

Hello everyone,

I need to customize the mapping template that gets automatically created by deploying the API (please see image add the bottom).
I tried to adapt the cloudFormationTemplate by adding some configs to the serverless.yml:

resources:
 Resources:
 ApiGatewayRestApi:
  Type: AWS::ApiGateway::Method
  Properties:
    RequestTemplates: 
      "application/json": "test"

The error is as follows: The CloudFormation template is invalid: Template error: resource ApiGatewayRestApi does not support attribute type RootResourceId in Fn::GetAtt
Any Ideas?
Thanks a lot!

1 Like

It seems Some where in your serverless.yml you used RootResourceId

Better If you can provide all code in serverless.yml to answer