aws-samples / amazon-cloudfront-secure-static-site

Create a secure static website with CloudFront for your registered domain.
Apache License 2.0
385 stars 140 forks source link

Use AWS::ACM::Certificate #44

Closed ConnorKirk closed 2 years ago

ConnorKirk commented 2 years ago

Issue #, if available:

Description of changes: Replace Custom Resource used to provision ACM Certificate with AWS::ACM::Certificate resource.

In order for automatic validation to occur, the hosted zone id for the domain is required. To achieve this, I've added a parameter for HostedZoneId.

I wasn't keen to add another parameter, especially as I think we could derive the HostedZoneId from the domain in a custom resource, but this adds extra complexity and potential to go wrong.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.