serverless-components / aws-cloudfront

Deploy an AWS CloudFront distribution for the provided origins using Serverless Components
https://serverless.com
Apache License 2.0
27 stars 12 forks source link

Support for Aliases and ViewerCertificate configuration #14

Open mdwt opened 4 years ago

mdwt commented 4 years ago

I would like to discuss a new feature to be able to specify Aliases and ViewerCertificate (similar to #13 ) in order to specify multiple CNAME values as well as a certificate ARN that covers all CNAMEs.

The serverless config can be something like this:

# serverless.yml

distribution:
  component: '@serverless/aws-cloudfront'
  inputs:
    region: us-east-1
    ...
    certificateArn: <acmCertArn>
    aliases:
       - <cname1>
       - <cname2>

which is then processed in createCloudFrontDistribution / updateCloudFrontDistribution

I'll submit the PR if we agree to go ahead.