Skip to content

Rust library for the Lambda Extensions API? #261

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

Closed
nmoutschen opened this issue Oct 13, 2020 · 3 comments · Fixed by #376
Closed

Rust library for the Lambda Extensions API? #261

nmoutschen opened this issue Oct 13, 2020 · 3 comments · Fixed by #376
Labels
enhancement New feature or request

Comments

@nmoutschen
Copy link
Contributor

AWS Lambda now support extensions. To improve the developer experience, it'd be nice to have a library similar to this but that handle the Extensions API specific calls.

It'd be nice to have something that works in the same way as the lambda-runtime but for the extension API, so that people could use Rust for creating Lambda extensions.

@rimutaka
Copy link
Contributor

@nmoutschen , correct me if I'm wrong, but neither runtime nor functions interact with the extensions directly, so there is no change to the runtime. Right?

The Extensions API seems to be similar to the runtime API. It should be possible to port the runtime code to make an extension.
I can't think of any use case for an extension other than logging or monitoring. Any real life examples outside of what is already in AWS docs?

@nmoutschen
Copy link
Contributor Author

Hey @rimutaka !

That's correct, there's no change to the runtime. Here the idea would be to create a new create (e.g. lambda-extension) that would make it easier to create extensions in Rust.

There are some use-cases around pre-fetching parameters that are changing too frequently to be exposed through environment variables. Doing so via extensions would allow async fetching outside of the main call path. I was also thinking about sending events asynchronously after a Lambda function has returned (e.g. you'd have APIGW -> Lambda, but you could asynchronously send to EventBridge). That said, lowering the barrier for entry would help a lot with developing more use-cases for this.

The rationale behind having a library for Rust is that, Rust being a compiled language, it's easier to create layers that can be used in all runtimes that supports the Extensions API.

@rimutaka
Copy link
Contributor

@nmoutschen , I'll be happy to contribute if someone takes the lead. Take a look at https://github.com/rimutaka/aws-lambda-rust-runtime. It is based on some good work @davidbarsky put in earlier this year in a separate branch. It may be better to base any further development on that because it has better logging and a few other improvements.

@jkshtj jkshtj added the enhancement New feature or request label Jan 21, 2021
@calavera calavera mentioned this issue Nov 29, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants