Skip to content

ryansb/acm-certs-cloudformation

Repository files navigation

Custom Resource to support AWS Certificate Manager

UPDATE: This functionality is now provided directly in CloudFormation here with the AWS::CertificateManager::Certificate resource. This is still a nice example of CloudFormation custom resources, but is no longer recommended for use.

This is a pair of resources to support adding the new ACM SSL certificates automatically in CloudFormation. Right now, it creates a certificate request given a comma-separated list of domains. The second resource adds support for configuring the cert on a CloudFront distribution.

Sample usage:

"ProdAcmCertificate": {
    "Type": "Custom::AcmCertificateRequest",
    "Properties": {
        "Domains": ["mysite.com", "*.mysite.com"],
        "ServiceToken": "ARN of your instance of the Lambda function in this repo"
    }
}

For a full example, see the template.json file in this repository. It creates a CloudFront distribution and issues an ACM certificate, and associates that cert with the distribution.

Todo:

  • Create a CertRequest
  • Delete CertRequest on resource delete
  • Sample CloudFormation template
  • Wait for the cert to be issued
  • provide a boolean attribute for whether the cert is issued
  • provide cert ID for CloudFront/ELB
  • Handle updates?

About

CloudFormation resource for AWS Certificate Manager cert requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published