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

Add experimentation Lambda integration #142

Merged
merged 2 commits into from
Apr 7, 2024
Merged

Add experimentation Lambda integration #142

merged 2 commits into from
Apr 7, 2024

Conversation

Pryz
Copy link
Contributor

@Pryz Pryz commented Mar 27, 2024

This change is an experimental Lambda integration. It mostly works but comes with a few caveats.

Instead of going with a new decorator to register the entrypoint for the Lambda, we can pass an optional function name to the handler:

def handler(event, context):
        dispatch.handle(event, context, entrypoint="myentrypoint")

If no entrypoint is defined, we expect the function to be defined in the RunRequest.

src/dispatch/experimental/lambda_handler.py Outdated Show resolved Hide resolved
src/dispatch/experimental/lambda_handler.py Outdated Show resolved Hide resolved
src/dispatch/experimental/lambda_handler.py Outdated Show resolved Hide resolved
src/dispatch/function.py Outdated Show resolved Hide resolved
Copy link
Contributor

@achille-roussel achille-roussel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A potential improvement would be document that this is not yet usable by end users since there is no API to configure the IAM role that dispatch should assume to invoke the lambda. It could save a couple hours of going down a rabbit hole looking for ways to make it work.

@Pryz Pryz merged commit c9cdf68 into main Apr 7, 2024
7 checks passed
@Pryz Pryz deleted the int-lambda branch April 7, 2024 03:02
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

Successfully merging this pull request may close these issues.

4 participants