1 Answer
- Newest
- Most votes
- Most comments
1
You can do this with a CloudFront distribution with multiple origins and behaviors. You will use a NoCache policy so all requests are forwarded to your origins except maybe your S3 objects. You will need to use Lambda@Edge or CloudFront Functions to handle the user-agent requirement.
Take a look at Accelerate your content using Amazon CloudFront
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Hi @kentrad, thanks a lot for the comment. The solution looks great! But I am wondering, do you think my initial ALB solution could work? And also what are the trade-off between this one and the ALB solutions?
@Petrabarus. Your Solution has more moving parts that you need to take care of is the first point. An ALB involves more costs compared to CloudFront. Using Lambdas as a Proxy is one of the Lambda Anti Patterns. And you have to pay for the wait-time till your Response arrives in your Lambda Function.
Hope this helps
@kentrad that makes sense totally! thanks a lot for the answer. really appreciate the customer obsessions.