Search code examples
amazon-cloudfront

Why should I use multiple origins for a cloudfront distribution?


I understand, that I get a new domain for my distribution, but why would i need multiple origins for one distribution?


Solution

  • A scenario could be a single CloudFront distribution for example.com with multiple sub-applications (origins) that come together to create a single application:

    • Static website at / (S3 configured as static website endpoint)
    • Blog at /blog path (ALB)
    • API at /api path (API Gateway)
    • Static assets at /static path (S3 bucket)