Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit d72a3e5

Browse files
authored
Added Cloudfront: Lambda@Edge introduction docs (#1708)
1 parent ed7712c commit d72a3e5

File tree

1 file changed

+23
-0
lines changed
  • content/en/user-guide/aws/cloudfront

1 file changed

+23
-0
lines changed

content/en/user-guide/aws/cloudfront/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,29 @@ This can occur because different operating systems adopt diverse DNS caching str
5656
Typically, after a few retries, the command should succeed.
5757
It's worth noting that similar behavior can be observed in the actual AWS environment, where CloudFront DNS names may take up to 10-15 minutes to propagate across the network.
5858

59+
## Lambda@Edge
60+
61+
{{< callout "note">}}
62+
We’re introducing an early, incomplete, and experimental feature that emulates AWS CloudFront Lambda@Edge, starting with version 4.3.0.
63+
64+
It enables running Lambda functions at simulated edge locations.
65+
This allows you to locally test and develop request/response modifications, security enhancements and more.
66+
67+
This feature is still under development, and functionality is limited.
68+
{{< /callout >}}
69+
70+
You can enable this feature by setting `CLOUDFRONT_LAMBDA_EDGE=1` in your LocalStack configuration.
71+
72+
### Current features
73+
- Support for [`CreateDistribution`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html) API to set up CloudFront distributions with Lambda@Edge.
74+
- Support for modifying request and response headers dynamically.
75+
76+
### Known limitations
77+
- The [`UpdateDistribution`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html), [`DeleteDistribution`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_DeleteDistribution.html), and [`Persistence Restore`](https://docs.localstack.cloud/user-guide/state-management/persistence/) features are not yet supported for Lambda@Edge.
78+
- Lack of full support for `viewer-request` and `viewer-response` event types.
79+
Please expect inconsistencies and missing functionality.
80+
- [`IncludeBody`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_LambdaFunctionAssociation.html#cloudfront-Type-LambdaFunctionAssociation-IncludeBody) option is currently not supported.
81+
5982
## Using custom URLs
6083

6184
LocalStack Pro supports using an alternate domain name, also referred to as a `CNAME` or custom domain name, to access your applications and file artifacts instead of relying on the domain name generated by CloudFront for your distribution.

0 commit comments

Comments
 (0)