AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: An example API using Mapping templates in Integration response along with Lambda function Resources: RestApi: Type: AWS::Serverless::Api Properties: StageName: dev DefinitionBody: # an OpenApi definition 'Fn::Transform': Name: 'AWS::Include' Parameters: Location: './api.yaml' OpenApiVersion: 3.0.3 EndpointConfiguration: Type: REGIONAL # Lambda function APIFunction: Type: AWS::Serverless::Function Properties: CodeUri: src/ Handler: lambda_function4.lambda_handler Runtime: python3.9 Events: ApiEvent: Type: Api Properties: RestApiId: !Ref RestApi Path: / Method: any Outputs: API: Description: Invoke URL to test mapping template Value: !Sub "https://${RestApi}.execute-api.${AWS::Region}.amazonaws.com/dev"