AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Serverless patterns - REST API regional with Lambda proxy integration Resources: #Lambda function LambdaRegionalApi: Type: AWS::Serverless::Function Properties: Handler: index.lambda_handler InlineCode: | import json def lambda_handler(event, context): return { "statusCode": 200, "body": json.dumps({ "message" : "Hello World! This is the regional API"}), } Runtime: python3.9 Events: HelloWorld: Type: Api Properties: Path: / Method: get RestApiId: Ref: ApiRegional #REST Regional API ApiRegional: Type: AWS::Serverless::Api Properties: StageName: prod EndpointConfiguration: REGIONAL # Output with API URL Outputs: EndpointUrl: Description: 'REST regional endpoint URL' Value: !Sub 'https://${ApiRegional}.execute-api.${AWS::Region}.amazonaws.com/prod'