DOC-410: Document CloudFront Functions execution and KeyValueStore - #881
Open
dmacvicar wants to merge 1 commit into
Open
DOC-410: Document CloudFront Functions execution and KeyValueStore#881dmacvicar wants to merge 1 commit into
dmacvicar wants to merge 1 commit into
Conversation
LocalStack now executes CloudFront Functions at request time and supports CloudFront KeyValueStore on both planes (localstack-pro#8204, ENG-1091). Adds three sections to the CloudFront service doc: CloudFront Functions, KeyValueStore (including Terraform usage, the account-id endpoint prefix and SigV4A signing), and a worked tenant-routing example built around header stamping. Registers the KeyValueStore data plane as Ultimate in the licensing data, so the page carries both plan tags. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dmacvicar
requested review from
HarshCasper,
anisaoshafi,
giograno,
quetzalliwrites and
remotesynth
as code owners
August 21, 2026 09:11
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.
Note
This is my suggested documentation change for CloudFront KeyValue store services. As I will be on vacation 🌴 the next two weeks and I just merged this feature. Feel free to use this as inspiration for the documentation, or just merge it as-s.
LocalStack now executes CloudFront Functions at request time and supports CloudFront KeyValueStore on both planes (localstack-pro#8204, ENG-1091).
This matters to teams whose edge routing is a CloudFront Function with its decision data in KVS: tenant pre-routers, canary and A/B routing, lookup-driven rewrites. Previously the code was stored but never run, so there was nothing to test locally.
Changes
aws/services/cloudfront.mdxgains three sections. I put it in the relevant service following the example of s3/s3control rds/rds-data, bedrock/bedrock-runtime, etc.cf.kvs()as the only runtime helper, Node rather than AWS's restricted runtime).cloudfront, data plane oncloudfront-keyvaluestore, ETag handling per plane, thecf.kvs()surface, an error parity table, Terraform usage.src/data/licensing/current-plans.jsonregisters the KVS data plane as Ultimate, so the page carries both plan tags (synced withnpm run sync:licensing-tags).Reviewer highlights
cf.kvs().get()then throws at request time. The doc says so directly rather than letting users hit it as a silent wrong answer.src/data/coverage/cloudfront.jsonstill marks the five KVS operations andTestFunctionunimplemented; it is auto-generated weekly, so the table disagrees with the prose until the next run. There is nocloudfront-keyvaluestore.jsonyet, so the data plane gets a hand-written operation table: a<FeatureCoverage>pointing at a missing file throws at runtime while still passing the build.Verification
Every command was run against
localstack-pro:dev(2026.8.0.dev313) and everytitle="Output"block is real output. That includes re-running the customer reproduction scripts from ENG-1092 and ENG-1093, which now pass where they previously returnedInternalFailure.npm run buildpasses with all internal links valid.Three things surfaced only by running it, and are documented because of it:
--kvs-arn, so an IP can never work and000000000000.localhostresolves for some clients but not others. Terraform fails withno such host, the AWS CLI does not. Onlylocalhost.localstack.cloudworks everywhere.awslocalneedspip install 'botocore[crt]', because these requests are SigV4A-signed.CustomOriginConfig.HTTPPortis ignored unless the origin domain is a localhost domain, so a custom origin on another port is silently dialled on 80. Worth a separate bug.Future