Skip to content

1.6.0

Choose a tag to compare

@fredericbarthelet fredericbarthelet released this 03 Sep 07:06
· 301 commits to master since this release
b06714f

This release exposes a new variable on static-website constructs:

  • cname: the domain name of the resource, such as d111111abcdef8.cloudfront.net

This can be used to reference the bucket from Route53 configuration, for example:

constructs:
    landing:
        type: static-website
        path: public

resources:
  Resources:
    Route53Record:
      Type: AWS::Route53::RecordSet
      Properties:
        HostedZoneId: ZXXXXXXXXXXXXXXXXXXJ # Your HostedZoneId
        Name: app.mydomain
        Type: A
        AliasTarget:
          HostedZoneId: Z2FDTNDATAQYW2 # Cloudfront Route53 HostedZoneId. This does not change.
          DNSName: ${construct:landing.cname}

This paves the way for the integration of Route53 Zone management directly within the construct. If you want to know more, you can get involved in the corresponding discussion.