Dieser Inhalt ist in der ausgewählten Sprache nicht verfügbar
Wir arbeiten ständig daran, Inhalte in der ausgewählten Sprache bereitzustellen. Vielen Dank für deine Geduld.
Can I use a single CloudFront web distribution to serve content from multiple origins using multiple behaviors?
Lesedauer: 2 Minute
0
Can I use a single Amazon CloudFront web distribution to serve content from multiple origins using multiple behaviors?
Resolution
You can configure a single CloudFront web distribution to serve different types of requests from multiple origins. For example, your website might serve static content from an Amazon Simple Storage Service (Amazon S3) bucket and dynamic content from a load balancer. You can serve both types of content from a CloudFront web distribution.
Follow these steps to configure a CloudFront web distribution to serve static content from an S3 bucket and dynamic content from a load balancer:
Open your web distribution from the CloudFront console.
Choose the Origins tab.
Create one origin for your S3 bucket, and another origin for your load balancer. Note: If you're using a custom origin server or an S3 website endpoint, you must enter the origin's domain name into the Origin Domain Name field.
From your distribution, choose the Behaviors tab.
Create a behavior that specifies a path pattern to route all static content requests to the S3 bucket. For example, you can set the "images/*.jpg" path pattern to route all requests for ".jpg" files in the images directory to the S3 bucket.
Edit the Default (*) path pattern behavior and set its Origin as your load balancer.