# Auth0 with AWS Lambda, API Gateway and multiple regions

**URL:** <https://community.auth0.com/t/auth0-with-aws-lambda-api-gateway-and-multiple-regions/22459>\
**Category:** Get Help\
**Tags:** api-gateway, aws, aws-lambda\
**Created:** [March 11, 2019, 11:55pm UTC](https://community.auth0.com/t/auth0-with-aws-lambda-api-gateway-and-multiple-regions/22459 "2019-03-11T23:55:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubenhak](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rubenhak/32/13024_2.png) [@rubenhak](https://community.auth0.com/u/rubenhak)\
**Post date:** [March 11, 2019, 11:55pm UTC](https://community.auth0.com/t/auth0-with-aws-lambda-api-gateway-and-multiple-regions/22459/1 "2019-03-11T23:55:35Z")

</div>

Hi Everybody,

My application is running on AWS using Lambdas and API Gateway. It also runs in multiple regions. Currently use Cognito for authentication. The problem is that it does not support multiple regions. I managed to manually sync user entries across Cognito identities in different regions, but this does not let me use the token generated in one region to be used in a different region.

I’m curious whether Auth0 would let me achieve that. Meaning:

1. Authenticate using some Lambda
2. Use a stateless Authorizer Lambda that would validate the JWT token and would work in any region.

I would also appreciate some hints on how to implement that using Auth0.

Thanks,  
Ruben

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 12, 2019, 11:09am UTC](https://community.auth0.com/t/auth0-with-aws-lambda-api-gateway-and-multiple-regions/22459/2 "2019-03-12T11:09:12Z")

</div>

Hey there @rubenhak!

To be honest I don’t have much knowledge regarding AWS Lambda so there will be for sure someone who can help better than myself but I did a quick research and found one of our articles on building serverless apps with AWS Lambda:

> **[Building Serverless Apps with AWS Lambda](https://auth0.com/blog/building-serverless-apps-with-aws-lambda/)**
>
> Learn how to build a serverless app with Lambda, the function-as-a-service platform from Amazon. Find out how AWS Lambda stacks up agains...

Hope it can help in some way!

---

<div class="post-metadata">

**Author:** ![rubenhak](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rubenhak/32/13024_2.png) [@rubenhak](https://community.auth0.com/u/rubenhak)\
**Post date:** [March 12, 2019, 6:08pm UTC](https://community.auth0.com/t/auth0-with-aws-lambda-api-gateway-and-multiple-regions/22459/3 "2019-03-12T18:08:29Z")

</div>

hi Konrad,

Thanks for the comments!  
I’ve seen that article. The reason I decided to ask here is that it still uses AWS Cognito, which does not work well when it comes to multiple regions. I wanted to make sure that with this approach I can login to one region, and then use the same token in a different region.

Thanks
