Control: CloudFront distributions should use custom SSL/TLS certificates
Description
This control checks whether CloudFront distributions are using the default SSL/TLS certificate CloudFront provides. This control passes if the CloudFront distribution uses a custom SSL/TLS certificate. This control fails if the CloudFront distribution uses the default SSL/TLS certificate.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cloudfront_distribution_use_custom_ssl_certificate
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cloudfront_distribution_use_custom_ssl_certificate --share
SQL
This control uses a named query:
select arn as resource, case when viewer_certificate ->> 'ACMCertificateArn' is not null and viewer_certificate ->> 'Certificate' is not null then 'ok' else 'alarm' end as status, case when viewer_certificate ->> 'ACMCertificateArn' is not null and viewer_certificate ->> 'Certificate' is not null then title || ' uses custom SSL certificate.' else title || ' does not use custom SSL certificate.' end as reason , region, account_idfrom aws_cloudfront_distribution;