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

feature requests - lambda node runtime, custom lambda function, and custom policy generation #495

Open
des-des opened this issue Jan 15, 2021 · 1 comment

Comments

@des-des
Copy link

des-des commented Jan 15, 2021

First of all thanks for building this. All my logs are now happily moving into my elasticsearch cluster :)

I had to fork this to make it work, I thought I would outline my changes, and why, and then you can see if you would be interested in me making a pull request

Problem 1 - policy size

Right now, beyond a certain number of lambdas, then will fail to deploy, since the policy on the ingestion lambda becomes too big.

Problem 2 - lambda runtime version

we have everything on 12.x, it would be nice to be able to configure the runtime version of the lambda deployed by this package.
why we are setting a node_options flag that is not available in node 10, so the lambda could not start,

Problem 3 - incompatible with latest elastic search

I am not quite sure about this one, but I think this line https://github.com/daniel-cottone/serverless-es-logs/blob/master/templates/code/logsToEs.js#L124 is problematic. https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html
We could also allow an optional es version in the config to configure this. But I feel like at some point I will want to go in and modify that lambda anyway, so potentially giving users to define their own lambda might be a more flexible solution

Please let me know if you would like a pull request on any of the above. Again, thanks for putting this together :)

@daniel-cottone
Copy link
Owner

Thanks for the feedback @des-des! Regarding your issues:

  1. If policy size becomes too large, one current workaround you could make is to use the default role. I don't think that making the arn wildcard by default is a great solution, since being very specific with access is best practice. Not sure what the best solution would be but I am open to suggestion.
  2. I think we just need to upgrade the default lambda runtime version rather than making this configurable.
  3. I am not sure about this one. I'll have to investigate or, if you could, provide some more details of what specifically is breaking.

I think that you should break these up into different issues rather than lumping them together, if you still feel each one warrants an issue.

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

2 participants