AcmCertificateArn not a valid child of ViewerCertificate


#1

I’m using serverless-single-page-app-plugin to set up cloudfront with a custom domain and certificate.

However I’m getting an error when trying to use my own requested certificate rather than the default one.

An error occurred: WebAppCloudFrontDistribution - Property validation failure: [Encountered unsupported properties in {/DistributionConfig/ViewerCertificate}: [ACMCertificateArn]].

Relevant part of serverless.yml

    DistributionConfig:
      Origins:
        - DomainName: ${self:custom.website.bucket}.s3.amazonaws.com
          Id: WebApp
          CustomOriginConfig:
            HTTPPort: 80
            HTTPSPort: 443
            OriginProtocolPolicy: https-only
      Enabled: 'true'
      Aliases: ${self:custom.website.alias}
      DefaultRootObject: index.html
      CustomErrorResponses:
        - ErrorCode: 404
          ResponseCode: 200
          ResponsePagePath: /index.html
      DefaultCacheBehavior:
        AllowedMethods: [HEAD, DELETE, POST, GET, OPTIONS, PUT, PATCH]
        TargetOriginId: WebApp
        ForwardedValues:
          QueryString: 'false'
          Cookies:
            Forward: none
        ViewerProtocolPolicy: redirect-to-https
      ViewerCertificate:
        ACMCertificateArn: arn:aws:acm..... and so on

The culprit being the very last line.

The AWS API docs does include it as ACMCertificateArn

What am I missing?


#2

Doh, could it be that I’m using uppercase, when it should be:

AcmCertificateArn