For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cloudformation-aws-cdn-configuration-is-missing.md.
A documentation index is available at /llms.txt.
CloudFront distributions must be active and include at least one origin so client traffic is routed through CloudFront’s caching and security controls (for example, AWS WAF, AWS Shield, and origin access controls). Without an active distribution or defined origins, traffic can bypass these protections and origins can be exposed to direct access and increased attack surface.
In CloudFormation, ensure resources of type AWS::CloudFront::Distribution set Properties.DistributionConfig.Enabled to true and that Properties.DistributionConfig contains an Origins entry with at least one origin definition. Resources missing the Origins object or with Enabled set to false (or the string "false") will be flagged.
For S3 origins, also configure origin access identity (OAI) or origin access control (OAC), and ensure each origin includes required fields such as Id and DomainName to prevent unintended public access.