Cloudfront Custom Distribution to route /api/* traffic to API Gateway ... Missing Authentication Token Error

I’m having trouble using a custom CloudFront distribution to route /api/* traffic to API Gateway and route the remaining traffic to S3. I’m receiving a 403 error with the “Missing Authentication Token” error message. I’ve followed the instructions provided by AWS here: https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cloudfront-distribution/

I’m new to both AWS and the serverless framework so any tips would be greatly appreciated. Thanks!

@thedrivendev

Were you able to find a solution to this?

-Todd

Hi Todd. Sorry for missing your message.

I was able to find a way around this by prepending all of my routes with ‘api/’. The CloudFront routing still seems strange to me. I’ve been away from serverless for the past few months but jumping back in now.

Thanks!