What problem does it solve?
This Skill fixes the common issue where CloudFront returns S3 static HTML content, 403, or 404 errors for /api/* routes instead of the expected API Gateway responses, which breaks API access for full-stack applications hosted on AWS with S3 static frontends and API Gateway backends.
Core Features & Use Cases
- Root Cause Diagnosis: Identifies common misrouting triggers including incorrect CloudFront cache behavior priority, missing API Gateway origin configurations, and use of internal ALB DNS names as CloudFront origins.
- Step-by-Step Debug Workflow: Provides explicit test commands to confirm API Gateway functionality directly and through CloudFront, plus header checks to verify what content CloudFront is serving.
- Multiple Fix Options: Offers three distinct resolution paths: adding a dedicated API Gateway cache behavior, switching API Gateway to regional endpoints, or bypassing CloudFront for API calls entirely.
- Prevention Best Practices: Includes guidelines to avoid recurring routing errors during CloudFront distribution setup.
Quick Start
Use the cloudfront-apigateway-s3-debug skill to diagnose and resolve the issue where your CloudFront domain returns S3 static content instead of API Gateway responses for /api/* routes.