Using AWS CloudFront as CDN

  • Has anyone tried to set up AWS CloudFront with Backendless?
  • Should I follow instructions based on Host Override or not?
  • If I have a server already in production with a custom domain name, eg., how should I switch around?
  • For a an app that is not in production, should I point the Backendless app to a custom domain at any time, or not? Eg. the name as mentioned above. (answer is No, after watching Marks youtube video more closely.)

Any feedback here would be helpful.

We have not tested it with CloudFront. I think it is extremely unlikely that it won’t work.

It is entirely up to you if you use host override or not. If you do, make sure the CDN uses your subdomain as the host. Otherwise, ensure your custom domain is still registered with Backendless (in Backendless console).

If you already have a custom domain name, create a DNS configuration as required by the CDN so the traffic gets routed through the new DNS mapping.


I need this spoon-fed :smiley:

If I have as my custom domain name in Backendless now, and want to continue using that also with a CDN config, my guess is I have to:

  1. Set up the CDN with as its custom domain name, pointing towards the domain
  2. Change the CNAME to point towards the CDN as per its config requirements
  3. Downtime for the app while SSL cert is in the making
  4. When new SSL cert is active with CDN, all is golden

Is this about right do you think?

Please ignore my post (now deleted), as it didn’t make sense.

What you describe is correct. That was my experience when I was playing around with Fastly CDN


I seem to have got it working - mostly… However, file resources in the app using the API URL is coming from instead of That is also the prefix used if I use the file selector in UI Builder, but not if I copy a link from the Files section.

I have not set up any custom domain names for this app. Do I need to tweak something on the Backendless side to get this working you think?

Are you talking about the URLs returned for the File Reference column types? If so, the URL in the response will depend on the domain name used in the request. If the request uses, then the domain for the referenced file will be

Yes, those as well, but I was thinking of using the File picker in UI Builder for image elements that are part of the UI, not File References:

And similarly, when fetching and setting images from the file system using the API URL:

Is the way to go then to create a CDN in addition, and put that in front of

Sure, that would work.

HMmm, will it really? No requests goes to - they all go to, right?

When I want to cache user generated content also on read, don’t I have to:

  1. Create a custom domain in Backendless, e.g., and check the radio button for File Repo Access, like this:

  2. When the SSL certificate is enabled, create as CDN front, pointing towards

Or am I getting this all wrong?

I am confused…

Requests go to where you/your app sends them. If you send them to, they go there. If that domain is configured at the CDN level to use as the source, the request will go there to grab the content…

Just do a simple test. Here’s your app’s web directory. Copy the public URL of index.html:

See what the URL looks like (it will use your subdomain). This tells me that if you use subdomain to address your files, things will work.

However, nothing stops you from creating and configuring, if that’s how you prefer to handle it.

Hehe, if you are confused Mark, imagine how I look!


I am talking about two scenarios at once, sorry about that. Let me focus on the most important part.

I have an app in production:
It answers to for both api requests and file requests, because it has File Repo Access checked in the Custom Domains setup. So, regardless of the server serving API requests or file requests, answers them all.

Now, I want to get a CDN in front of this server, and take over answering all requests to How do I do that?

If I remove the CNAME record in Backendless, and point that towards the CDN instead, then API requests will be working just fine I suspect, but Files will then be accessed through

That is my worry. :worried:
Unless this is now superclear, I guess I’ll just have to test this out with another server so that I know what will happen…

Hi @Egil_Helland ,

As far as I understand, nothing will change on our end. Backendless will continue to send content as it did before because Backendless is unaware of your CDN settings. Whoever initiated the request will receive the response, and what happens next with that content is beyond our control. It might be worth trying, and if anything unexpected occurs, we can collectively address specific cases.


I think I just have to test this out, as you suggest Viktor. I’ll do that on a separate site from my production site to make sure that I both understand what is happening, mimic the production setup and the changes needed, and document my steps.