https://github.com/cbschuld/aws-cf-create-certificate
This repository provides a CloudFormation template to automate SSL/TLS certificate creation using AWS Certificate Manager (ACM) for secure static websites with S3, CloudFront, and Route53.
https://github.com/cbschuld/aws-cf-create-certificate
acm aws certificates cloudformation cloudformation-template domain ssl
Last synced: 13 days ago
JSON representation
This repository provides a CloudFormation template to automate SSL/TLS certificate creation using AWS Certificate Manager (ACM) for secure static websites with S3, CloudFront, and Route53.
- Host: GitHub
- URL: https://github.com/cbschuld/aws-cf-create-certificate
- Owner: cbschuld
- License: mit
- Created: 2025-05-02T15:42:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-20T21:31:57.000Z (about 1 year ago)
- Last Synced: 2025-06-18T05:39:46.889Z (12 months ago)
- Topics: acm, aws, certificates, cloudformation, cloudformation-template, domain, ssl
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# AWS CloudFormation: Automate SSL/TLS Certificate Creation with ACM
[](https://github.com/cbschuld/aws-cf-create-certificate/stargazers)
[](LICENSE)
This repository provides a CloudFormation template to automate SSL/TLS certificate creation using AWS Certificate Manager (ACM) for secure static websites with S3, CloudFront, and Route53.
Allows you to provision both the apex (e.g. domain.com) and wildcard (e.g. \*.domain.com) ACM certificates via CloudFormation, automatically creating DNS validation records and exporting the certificate ARN for use in other scripts or templates.
## Quick Use
Determine the `HostedZoneId` for your domain:
```sh
./get-hosted-zone-id.sh -d [DOMAIN] -p [NAMED_PROFILE]
```
Deploy to create the Certificate:
__Note: The `AppName` is used to prefix the output from the certificate.__
```sh
./deploy.sh \
-d imgbt.com \
-z [ZONE_ID] \
-a [APP_NAME] \
-p [NAMED_PROFILE] \
-r [REGION]
```
## Architecture
```mermaid
graph TD
A[User] --> B[CloudFormation Stack]
B --> C[AWS Certificate Manager]
C --> D[Route53 DNS Validation]
C --> E[Issued SSL/TLS Certificate]
D --> C
```
## Summary of Scripts
A small collection of Bash utilities to streamline ACM certificate provisioning:
- **get-hosted-zone-id.sh**
Lookup the Route 53 Hosted Zone ID for a given domain and AWS CLI profile.
- **deploy-certificate.sh**
Deploy a DNS‑validated ACM certificate (apex + wildcard) using CloudFormation, tagging resources by application name.
Both scripts verify prerequisites (AWS CLI) and validate all required parameters before executing. Simply pass in your domain, hosted zone, application name and AWS profile to automate certificate issuance end‑to‑end.
## Use Cases
- Produce apex and wildcard certificates with an output Arn
- Automating certificate provisioning for CI/CD pipelines.
- Securing a static website with HTTPS.
- Learning CloudFormation and ACM for AWS certifications.
## Contributing
Want to improve this template? Submit a pull request or open an issue! We're looking for:
- New features (e.g., ACM certificate automation).
- Documentation enhancements.
- Architecture diagrams or example sites.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
## Stay Updated
Star this repo and follow me on [X](https://x.com/cbschuld) for updates!