0
votes

I have an AWS Serverless cloudformation template creating a lambda function and a rest api. I would like some guidance or pointers on the steps to take in order to create a custom API domain name so that my api have the URL:

api.search.mydomainname.com

How does this work with my existing Serverless function code and the Events?

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31


MyFunction:
...
 Events:
        ProxyResource:
          Type: Api
          Properties:
            RestApiId: !Ref RestApi
            Path: /{proxy+}
            Method: ANY
        RootResource:
          Type: Api
          Properties:
            RestApiId: !Ref RestApi
            Path: /
            Method: ANY
1

1 Answers

1
votes