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

AWS Lambda Templates #20

Open
nandorholozsnyak opened this issue Jan 1, 2022 · 6 comments
Open

AWS Lambda Templates #20

nandorholozsnyak opened this issue Jan 1, 2022 · 6 comments

Comments

@nandorholozsnyak
Copy link

I have been experimenting with JBang for weeks now and I really want to use it for my AWS Lambda functions, it seems super think and usable.

A few days ago a new issue was opened on JBang, it has some "naming" issue with its libs method on export, but anyways, in the issue an ideas section was added where I wrote that it would be so cool to have a catalog where you have the typical templates for your AWS Lambda functions (simple function, SQS/SNS/S3 triggers): jbangdev/jbang#1175

@maxandersen told me that these templates should be put into another repository and not to the official JBang one. My question is that, is it okay to open a PR to this repository where I would add some of the typical templates that using Quarkus and AWS Lambda dependencies?

Here you can find some progress: https://github.com/nandorholozsnyak/jbang-catalog/tree/feature/aws-lambda-templates/aws

@maxandersen
Copy link
Member

That could make sense....I would like to see how they work...whats the minimal steps to show these working?

ps. your "feature/aws-lambda-templates" branched helped discover a bug in jbang catalog handling: #20 :)

@nandorholozsnyak
Copy link
Author

nandorholozsnyak commented Jan 2, 2022

That could make sense....I would like to see how they work...whats the minimal steps to show these working?

I'm planning to write an article about my use cases using JBang with Terraform. Of course these are not the minimal steps, but probably the easiest, or with CloudFormation.

ps. your "feature/aws-lambda-templates" branched helped discover a bug in jbang catalog handling: #20 :)

To be honest, for me when I added it as a "test" repository, it worked for a few minutes, then after commits to the repository and catalog updates it stopped working, but first it was able to resolve the the templates, then it was using older committed templates and not the new ones.

@gsmet
Copy link
Member

gsmet commented Jan 3, 2022

But in the case of lambdas, when using JBang, won't you pay the price of rebuilding the app every time you initialize your lambda? If so, is it such a good fit?

(I might be missing something in what you did though)

@gsmet
Copy link
Member

gsmet commented Jan 3, 2022

(When I mean initialize, I'm talking about the cold start of the lambda)

@maxandersen
Copy link
Member

maxandersen commented Jan 4, 2022

No. Jbang always generate a jar.

In here he take that jar and deploy it.

@nandorholozsnyak
Copy link
Author

As Max says, we are "deploying" an already built .jar file, that contains everything, so AWS in lambda invoke will not rebuild it again.
The cold start of course is a pain point of it, could take more than 1 sec on the first run, but upcoming invokes are faster until the lambda is alive. Of course, with JBang you can also create native images, and it can help the problem of the cold start. Will do some tutorials or changes to the templates to make sure the native image generation is also the part of it.

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

No branches or pull requests

3 participants