Why Can't My CloudFront Connect to App Runner Service?

0

Hello everyone,

I'm currently facing an issue where my CloudFront distribution cannot connect to my App Runner service, and I'm hoping someone here might be able to offer some insights or solutions.

I have an App Runner service that is up and running, with both incoming and outgoing public access ports enabled. Additionally, I've set up a CloudFront distribution, adding the App Runner service as its origin, with a path pattern of "/api/" to route requests to this service. In theory, this setup should allow me to access the App Runner service through the CloudFront's /api/ path (other paths pointing to an S3 hosted website work fine), but in practice, CloudFront consistently returns a 404 error.

Cloud Front Config

I've spent the entire day debugging this issue without success. Here's a summary of what I've checked and tried so far:

  • Verified that the App Runner service is operational and accessible directly.
  • Ensured that the CloudFront distribution is configured to point to the correct App Runner endpoint.
  • Checked CloudFront's path pattern settings and confirmed that they are correctly set to route "/api/*" requests to the App Runner service.
  • Looked into the possibility of misconfigurations in CloudFront that might prevent it from properly connecting to App Runner, but found nothing obvious.

I'm at a loss for what else I could check or adjust to resolve this issue. Has anyone encountered a similar problem, or does anyone have any suggestions on what might be causing this disconnection between CloudFront and App Runner? Any advice or insights would be greatly appreciated.

Thank you in advance for your help!

Matrix
asked a month ago222 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions