14

I am trying to create a CloudFormation stack in us-east-2 (Ohio) region. However, getting the following error

com.amazonaws.services.cloudfront.model.InvalidLambdaFunctionAssociationException:
The function must be in region 'us-east-1'

I have gone through the below sources and understand that this is a requirement that must be fulfilled by the lambda. My question is why? Why such restriction have been placed? I have looked in the documentations but they only mention the usage of us-east-1 but provide no reasoning!

https://github.com/awslabs/serverless-application-model/issues/635

https://medium.com/@mnylen/lambda-edge-gotchas-and-tips-93083f8b4152

cmxiv 914
  • 610
  • 6
  • 10

3 Answers3

14

It seems to be an arbitrary decision. Lambda@Edge functions are distributed globally, but they originate from one place. The reason is most likely that there needs to be a single source of truth, and they picked us-east-1. This was also the first region and is special in a few ways (it handles billing, etc). It may have some benefits on their backend that we are not aware of.

stefansundin
  • 2,826
  • 1
  • 20
  • 28
4

The reason is because Cloud-front's Control plane is only in us-east-1. (i.e. if us-east-1 is down, the ability to update/create distributions is down.)

Yaakov Bressler
  • 9,056
  • 2
  • 45
  • 69
hazirovich
  • 170
  • 7
2

Because cloudfront is deployed on us-east-1 even though it's a global service.

Yaakov Bressler
  • 9,056
  • 2
  • 45
  • 69
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254