Class CmsCdnConfiguration

java.lang.Object
com.cloudforgeci.api.core.topology.CmsCdnConfiguration

public final class CmsCdnConfiguration extends Object
CloudFront CDN configuration for CMS platforms.

Configures CloudFront distributions for CMS static assets and media delivery, including:

  • S3 origin for media files
  • ALB origin for dynamic content
  • Optimized cache behaviors per path
  • SSL certificate integration
  • Route53 alias records

Cache Strategy:

  • Static assets (CSS, JS, images): Long TTL, cached at edge
  • Media uploads: Cached, served from S3
  • Dynamic content: No caching, forward all headers
  • Admin pages: No caching, bypass CDN
Since:
3.1.0
  • Method Details

    • createCmsDistribution

      public static software.amazon.awscdk.services.cloudfront.Distribution createCmsDistribution(SystemContext ctx, CmsSpec spec, software.amazon.awscdk.services.s3.Bucket mediaBucket, String albDnsName)
      Create CloudFront distribution for CMS with media bucket and ALB origins.
      Parameters:
      ctx - the SystemContext
      spec - the CMS specification
      mediaBucket - the S3 media bucket
      albDnsName - the ALB DNS name for dynamic content
      Returns:
      CloudFront distribution
    • createMediaOnlyDistribution

      public static software.amazon.awscdk.services.cloudfront.Distribution createMediaOnlyDistribution(SystemContext ctx, CmsSpec spec, software.amazon.awscdk.services.s3.Bucket mediaBucket)
      Create CloudFront distribution for media-only CDN (no ALB).
      Parameters:
      ctx - the SystemContext
      spec - the CMS specification
      mediaBucket - the S3 media bucket
      Returns:
      CloudFront distribution for media
    • createStaticAssetsCachePolicy

      public static software.amazon.awscdk.services.cloudfront.CachePolicy createStaticAssetsCachePolicy(SystemContext ctx)
      Create cache policy optimized for static assets.
      Parameters:
      ctx - the SystemContext
      Returns:
      cache policy for static assets
    • createMediaCachePolicy

      public static software.amazon.awscdk.services.cloudfront.CachePolicy createMediaCachePolicy(SystemContext ctx)
      Create cache policy optimized for media files.
      Parameters:
      ctx - the SystemContext
      Returns:
      cache policy for media files
    • createDnsRecords

      public static void createDnsRecords(SystemContext ctx, software.amazon.awscdk.services.cloudfront.Distribution distribution)
      Create Route53 alias records for CloudFront distribution.
      Parameters:
      ctx - the SystemContext
      distribution - the CloudFront distribution