I have a cloudfront distribution which I am using to manage directing traffic to different components of my application.
/*
goes to an S3 bucket hosting my client
/api/*
goes to an API gateway
However, it seems that the /api/
part is passed on to my API gateway function, so rather than CFront://api/action
proxying to APIGateway://action
, cloudfront is proxying APIGateway://api/action
.
This results in my lambda not being triggered.
Is there a way to ignore the cloudfront path and not forward that to the origin?