Fix: handle regions where Lambda Function URLs are not supported#1426
Open
RemyTinco wants to merge 1 commit intozappa:masterfrom
Open
Fix: handle regions where Lambda Function URLs are not supported#1426RemyTinco wants to merge 1 commit intozappa:masterfrom
RemyTinco wants to merge 1 commit intozappa:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #130
Summary
list_function_url_configsindelete_lambda_function_url()with a try/except forClientErrorProblem
During
zappa update, whenfunction_url_enabledis not set,cli.pyunconditionally callsdelete_lambda_function_url(). In regions that don't support Lambda Function URLs (e.g.eu-south-2), theListFunctionUrlConfigsAPI doesn't exist, causing anAccessDeniedExceptionthat aborts the entire deployment after the Lambda code has already been uploaded.AWS docs confirming unsupported regions: https://docs.aws.amazon.com/lambda/latest/dg/urls-configuration.html
Change
File:
zappa/core.py—delete_lambda_function_url()The fix catches
ClientErroron thelist_function_url_configscall and returns early. This is the only unguarded call site — all otherlist_function_url_configscalls incore.pyandcli.pyare behindif self.use_function_urlchecks.Testing
Verified on
eu-south-2(Europe - Spain) deployment withfunction_url_enabledunset.