# Auth0 Lambda@Edge authentication with CloudFront

**URL:** <https://community.auth0.com/t/auth0-lambda-edge-authentication-with-cloudfront/188974>\
**Category:** Get Help\
**Tags:** sessions, access-token\
**Created:** [July 9, 2025, 2:40pm UTC](https://community.auth0.com/t/auth0-lambda-edge-authentication-with-cloudfront/188974 "2025-07-09T14:40:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickycupcakes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nickycupcakes/32/75645_2.png) [@nickycupcakes](https://community.auth0.com/u/nickycupcakes)\
**Post date:** [July 9, 2025, 2:40pm UTC](https://community.auth0.com/t/auth0-lambda-edge-authentication-with-cloudfront/188974/1 "2025-07-09T14:40:56Z")

</div>

I am trying to create a static website in S3 (with CloudFront) that uses Auth0 in order to authenticate users in to the site. I have seen most of the samples out there of what the Lambda@Edge login script might look like, but I can’t get any of them to actually work. I couldn’t get any of these to function properly:

I have seen some of the examples on github but am struggling to get any of them to work:  
/experoinc/aws-lambda-edge-oauth  
/martzmakes/blog-cdk-cloudfront-edge-auth0

Wondering if anyone has a good, basic working example of the login process for Auth0 in Lambda@Edge (node.js environment)?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [July 14, 2025, 5:58pm UTC](https://community.auth0.com/t/auth0-lambda-edge-authentication-with-cloudfront/188974/3 "2025-07-14T17:58:21Z")

</div>

Hi @nickycupcakes

Welcome to the Auth0 Community!

I am sorry about the delayed response to your question!

As mentioned in [this](https://community.auth0.com/t/auth0-calling-a-lambda-edge-endpoint/167968) community post:

> Unfortunately there’s no direct plugin or plug-and-play solution for integration between you AWS Lambda@edge application and Auth0, however from the post-login action (for example) you are able to make an HTTP request for the lambda@edge endpoint. Please make a note that this action will be handled between Auth0 Action server and Lambda@edge application, so client browser will be omitted during this transaction. The response can be later passed to the client via id or access token claims.

Also, you can take a look at this open source [Github Repository](https://github.com/experoinc/aws-lambda-edge-oauth) regarding user authorization using Auth0 and Lambda@Edge.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 28, 2025, 5:58pm UTC](https://community.auth0.com/t/auth0-lambda-edge-authentication-with-cloudfront/188974/4 "2025-07-28T17:58:44Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
