Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda Edge not working when using anything else than us-east-1 #60

Open
tomreineke opened this issue Sep 20, 2023 · 1 comment
Open

Comments

@tomreineke
Copy link

When using an AWS region other than us-east-1, I'm getting the following error:
CREATE_FAILED AWS::CloudFront::Distribution CFDistribution Resource handler returned message: "Invalid request provided: AWS::CloudFront::Distribution: The function must be in region 'us-east-1'. ARN: arn:aws:lambda:eu-west-1:16178 0196320:function:oidc-auth-Clo udFrontAuthFunction-6MGhzj0e5r ok:1 (Service: CloudFront, Status Code: 400, Request ID: 287a68e2-8ffe-4e8c-a7a3-0f3120 db1c8d)" (RequestToken: d88e64 29-752a-7ea7-0910-76dbb1585f45 , HandlerErrorCode: InvalidRequest) ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack oidc-auth The following resource(s) failed to create: [CFDistribution]. Rollback requested by user.
In serverless-nextjs/serverless-next.js#2179 there was a similar issue.

@bdellegrazie
Copy link

@tomreineke - you must deploy the lambda to us-east-1 region. It is replicated from there to the regions used by your cloudfront configuration.
Documentation on this restriction is clear here:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-restrictions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants