-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
crossRegionReference: Cannot update Lambdas@Edge after first deployment #28200
Comments
I'll look into this. |
Hi I would suggest to create both the cloudfront distribution and edge function in us-east-1. Is there any reason your cloudfront has to be deployed in The reason you can't update the lambda function is due to the strong reference from the crossRegionReferences design One option is to use aws-cloudfront.experimental EdgeFunction construct without using crossRegionReferences if you really need to deploy the cloudfront stack in Let me know if it works for you. |
There's no particular reason, I have worked around it by deploying cloudfront in US-East-1 and avoiding crossRegionReference totally. Hence, there is no blocker at the moment just that the feature is not working as it is supposed to as it doesn't allow Lambda code changes updates. |
Hi @SonicV2 Please check out my edited comment above. Let me know if it works for you. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Describe the bug
I am using the crossRegionReference to reference Lambdas created in the US-East-1 region in my EU-Central-1 stack. This is because Cloudfront only allows Lambdas@Edge only allows US-East-1 Lambdas and Cloudfront is deployed in my EU-Central-1 stack. It works the when deployed the first time but I can't update the Lambdas after.
I have worked around it by deploying the cloudfront in my US-East-1 stack and not using crossRegionReference
Expected Behavior
Updates for lambda should be possible
Current Behavior
Works the first time i deploy but got an error message when I try to update
UPDATE_FAILED | Custom::CrossRegionExportWriter | ExportsWritereucentral1E172851B74269898
Received response status [FAILED] from custom resource. Message returned: Error: Exports cannot be updated:
Reproduction Steps
Take the code above, deploy it for the first time. Then try updating the lambda source code.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.111.0
Framework Version
No response
Node.js Version
20.5.1
OS
MacOS 13.5.1
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: