Skip to content

Instantly share code, notes, and snippets.

@monkey-codes
Created June 17, 2020 01:02
Show Gist options
  • Select an option

  • Save monkey-codes/1a57c482cb847502771e369aa4834a2f to your computer and use it in GitHub Desktop.

Select an option

Save monkey-codes/1a57c482cb847502771e369aa4834a2f to your computer and use it in GitHub Desktop.
CFN Fargate Service DNS Record
Resources:
...
ServiceDNSRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneName: !Sub '${DomainName}.'
Comment: DNS name for service.
Name: !Sub '${ServiceHost}.${DomainName}'
AliasTarget:
DNSName: {'Fn::ImportValue': !Sub '${ALBStackName}:ALBDnsName'}
HostedZoneId: {'Fn::ImportValue': !Sub '${ALBStackName}:ALBCanonicalHostedID'}
Type: A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment