Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.48 KB

README.md

File metadata and controls

39 lines (32 loc) · 1.48 KB

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?