To use a single CloudFront web distribution to serve content from multiple origins by configuring multiple cache behaviors, follow these steps:
- From CloudFront console, go to web distribution.
- Select the Origins tab and create 2 origins, one for S3 bucket and another for the load balancer.
- Select the Behaviors tab and create a behavior.
- Specify a path pattern so that all the static content requests are routed to S3 Bucket.
- Edit the path pattern behavior in Default (*), setting its Origin as the load balancer.