Skip to content

[Custom Domains][M1]Implement the base case #1125

@praneetap

Description

@praneetap

Related Issues

#783

Description

This is a proposal to implement the base case of Custom Domains feature.
SAM input -

  Type: AWS::Serverless::Api
  Properties:
    Domain:
      DomainName: example.com
      CertificateArn: !Ref CertificateARN 

This takes in a valid certificate ARN and creates a Regional endpoint mapping of the custom domain to the API basepath /. The CFN resources that are created are -

  APIDomainName:
    Type: 'AWS::ApiGateway::DomainName'
    Properties:
      EndpointConfiguration:
        Types: [REGIONAL]
      RegionalCertificateArn: !Ref CertificateARN
      DomainName: !Ref DomainName

  APIBasePathMapping:
    Type: AWS::ApiGateway::BasePathMapping
    Properties:
      DomainName: !Ref APIDomainName
      RestApiId: !Ref MyApi
      BasePath: /
      Stage: Prod

Apart from template creation, couple more in Acceptance Criteria :

  1. This must add base path and server fields to swagger/openapi doc.
  2. Also add this to the hash so that API GW redeploys if there is a change in base path or domain resources. (Since changing the base path does not update the swagger every time)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions