Route mypagesapp.com/aws/ -> aws e2c

Hello, first of all, I am a fresh user and this is my first post in the cloudflare community. So far, cloudflare feels very dev oriented and I really like it. :heart:

My actual question is the following. I will deploy a pages app (nextjs) to cloudflare on the domain:
app.example.com. The api functions will be on the path /api and I would like to route some requests to an e2c cluster inside aws on, lets say, /aws

Recap
SPA: app.example.com
API: app.example.com/api
AWS app.example.com/aws

So far the idea, this would allow me to have a good control over the cookies, also create subdomains for different branches / stages, and reuse the high order url parts.

I found that it should be actual possible with ZeroTrust and tunneling, but could’t find a good example with the usage of pages.

I’ll be very grateful for pointing me in the right, direction.
Thank you

Hello there,

It is a pleasure to welcome you to Cloudflare and to our Community! You will be able to have your questions answered with all the community support.

In this particular case we have our Docs that you can dive specifically into Zero Trust:

As well as FAQ about Tunnels:

I hope this can help but feel free to reach out as you need.

Cheers and have a good week.