The goal is to create a custom domain for my Serverless api: api.example.com. So my approach is to create this Route53 record:
ApiDomainRecord: Type: AWS::Route53::RecordSet Properties: Type: A Name: api.example.com HostedZoneId: Z2PERRPAZRTJGB AliasTarget: HostedZoneId: Z2FDTNDATAQYW2 DNSName: Fn::GetAtt: [ --> what do we enter here <--, DomainName ]
But how do I provide the domain name from the CloudFront emitted by Serverless?
I am aware about the
serverless-domain-manager plugin, but I don’t like how it’s not completely declarative. How It want’s me to run a command at some point. That’s why I’m turning to CloudFormation for this one.