Forum Discussion

dhaasz's avatar
dhaasz
Icon for Nimbostratus rankNimbostratus
Nov 07, 2024

Connecting a AWS Cloudfront Distribution Pool/Node to an F5 iApp

Hi there,

 

I was wondering if I could get some advice on connecting up AWS Cloudfront Distribution Pool/Node to an F5 iApp.

 

The iApp in question has a default pool of on premises servers but we have a requirement in that for a specific URL path then we instead forward onto a AWS Cloudfront distribution. The below is a snippet from the irule we currently have configured:

when CLIENT_ACCEPTED {
    SSL::disable serverside
}


when HTTP_REQUEST
{
    if {([HTTP::uri] starts_with "/falc/")} 
    {
        SSL::enable serverside
        HTTP::header replace Host "d2s8lx2sdbghef.cloudfront.net"
        pool d2s8lx2sdbghef.cloudfront.net
    }

 

The pool and the FQDN node are showing green which means F5 can resolve the addresses. However when we attempt to go to a URL which starts with the prefix above instead of being direct to the Cloudfront distribution (and the S3 content behind) we instead get the following:

 

Check and the distribution has redirect HTTP to HTTPS configured on the behaviour and we are attempting to replace the Host with the matching distribution.

 

I was wondering if this has been encountered by anyone before, if anyone has attempted anything similar and if able to get it working how that was achieved.

Thank you in advance of any assistance that may provide. 

No RepliesBe the first to reply