Conversation
An origin whose domain is a bucket REST endpoint (`<bucket>.s3.<region>.amazonaws.com` -- what `S3OriginConfig` origins and CDK's `S3BucketOrigin` carry) resolves in real DNS, so the data plane proxied the fetch to real AWS S3 and the distribution never served the bucket. Route it to this process like an S3-website origin, keeping the bucket domain in `Host` so the S3 front door resolves it virtual-hosted style. An explicit `CustomOriginConfig` still wins.
Sorttech
force-pushed
the
fix/cloudfront-s3-origin-resolution
branch
from
September 24, 2026 16:14
0375c70 to
0455356
Compare
Owner
Author
|
Retargeted upstream as faiscadev#2559. |
Owner
Author
|
Retargeted upstream as faiscadev#2559. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An origin whose domain is a bucket REST endpoint
(
<bucket>.s3.<region>.amazonaws.com-- whatS3OriginConfigorigins andCDK's
S3BucketOrigincarry) resolves in real DNS, so the data planeproxied the fetch to real AWS S3 and the distribution never served the
bucket. Route it to this process like an S3-website origin, keeping the
bucket domain in
Hostso the S3 front door resolves it virtual-hostedstyle. An explicit
CustomOriginConfigstill wins.Test plan
Regression test:
serves_static_from_s3_rest_originincrates/fakecloud-e2e/tests/cloudfront_dataplane.rsVerification
On this exact head, rebased onto current
main:cargo fmt --all --check- clean.cargo clippy --workspace --all-targets -- -D warnings- clean.cargo test --workspaceexcludingfakecloud-e2e,fakecloud-conformance,fakecloud-tfaccandfakecloud-parity(the same set CI'stestjob runs),plus
cargo test -p fakecloud-conformance --lib- 9931 passed, 0 failed.cargo test -p fakecloud-e2e --test cloudfront_dataplane- the regressiontest above passes against a freshly built
target/debug/fakecloud.Found by deploying a CDK CloudFront + S3 SPA against fakecloud.