Skip to main content

AWS CloudFront Distribution Documentation

Overview​

AWS CloudFront is a content delivery network (CDN) provided by Amazon Web Services. It delivers data, videos, applications, and APIs to customers globally with low latency and high transfer speeds.

Key features:

  • Distributes content via edge locations worldwide
  • Low latency and high transfer speed
  • Supports caching and custom origin servers
  • Integration with AWS services (S3, EC2, etc.)

How DiscountCloud Uses AWS CloudFront​

In DiscountCloud, we track AWS CloudFront distributions to manage FinOps operations for our users. Each distribution is linked to an AwsAccount to identify which AWS account owns the distribution.

AwsCloudfrontDistribution Model Fields​

  • aws_account: Foreign key linking the distribution to an AWS account
  • distribution_id: Unique ID of the CloudFront distribution
  • domain_name: Domain name of the distribution
  • status: Current status (e.g., Deployed, InProgress)
  • enabled: Boolean indicating if the distribution is enabled
  • staging: Boolean indicating if the distribution is in staging
  • is_ipv6_enabled: Boolean indicating if IPv6 is enabled
  • region_name: AWS region of the distribution (optional)
  • last_synced: Timestamp of the last sync with AWS

Note: region_name is optional. Other fields are automatically populated from AWS during sync.

Example Usage in Django Admin​

  1. Log in to the Django admin panel.
  2. Click on AwsCloudfrontDistribution in the admin menu.
  3. Add a new distribution by filling in the fields:
    • aws_account
    • distribution_id
    • domain_name
    • status
    • enabled
    • staging
    • is_ipv6_enabled
    • region_name (optional)
  4. Save the entry. You can now view and manage it in the admin panel.

References​