awslabs / awslabs/aws-solutions-constructs

New Pattern: aws-route53-acm-cloudfront

Open
#130 8 comments 0 reactions 0 assignees View on GitHub
feature-request needs-triage
Dominant language
TypeScript
Stars
1.4k
Forks
268
Avg merge
5h 18m
Merged PRs (30d)
5

Description

It is often necessary to use a custom domain with SSL certificate on a CloudFront distribution. While existing patterns like aws-s3-cloudfront can serve files, setting up custom domain for the CloudFront and attaching SSL certificates needs additional work. This is particularly hard for someone who is not familiar setting up certificates and DNS records. The proposed construct will make it easy to create CloudFront distributions that is ready for production with custom domain and SSL certificate.

### Use Case
- The proposed construct can be used along with aws-s3-cloudfront construct to deploy static websites with custom domain and SSL certificate.
- The proposed construct can be used along with aws-cloudfront-apigateway to create custom, secure endpoints for user facing APIs.

### Proposed Solution
The proposed construct has the following features:
- Automatically verify domain ownership and provision SSL certificate using ACM. (Fully automatic if Route53 is used as the DNS service.)
- Import an existing SSL certificate using its ARN.
- Configure cloudFront to use custom domain by adding alias configuration.
- Use incoming hosted zone or create one and then link it to CloudFront using Alias record.

### Other
I have used this pattern in multiple prototypes and a solution construct of this pattern can made the CDK script shorter and elegant.

* [x] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing aws-s3-cloudfront and aws-cloudfront-apigateway constructs mentioned in the issue, then examine how the repository structures similar patterns. Done should cover ACM certificate provisioning or import, custom-domain aliases, hosted-zone handling, and Route53 integration for CloudFront.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.