{{ message }}
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Add PRO hooks for new lambda provider#7560
Merged
Merged
Conversation
01838a8 to
feb88d3
Compare
dfangl
approved these changes
Feb 6, 2023
| self.create_layer_lock = threading.RLock() | ||
| self.router = FunctionUrlRouter(ROUTER, self.lambda_service) | ||
| self.layer_fetcher = None | ||
| lambda_hooks.inject_layer_fetcher.run(self) |
Member
There was a problem hiding this comment.
Interesting idea letting the hook inject the layer fetcher into the provider. Not sure if I like it, but a valid workaround since hooks cannot return a value.
Member
Author
There was a problem hiding this comment.
Agreed. Maybe, I learn more elegant ways to handle this with function plugins in the future ...
Comment on lines
+514
to
+517
Member
There was a problem hiding this comment.
I am still not 100% happy with this, as IAM should enforce it, but seems fine to leave it for now.
Member
Author
There was a problem hiding this comment.
Ok, maybe better to tackle this in a follow-up ...
Omitted factory-based example in providers due to merge conflict:
`localstack/services/providers.py`
```python
layer_fetcher = get_aws_layer_fetcher_class()
layer_fetcher = get_aws_layer_fetcher_fun()
provider = LambdaProvider(layer_fetcher=layer_fetcher)
lambda_hooks.inject_layer_fetcher.run(provider)
return Service("lambda", listener=AwsApiListener("lambda", provider), lifecycle_hook=provider)
```
Fix `ModuleNotFoundError: No module named 'orjson'`
feb88d3 to
dab096d
Compare
3 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

See https://github.com/localstack/localstack-ext/pull/1322
inject_layer_fetcher