Hacker News new | ask | show | jobs
by vhaenel 3806 days ago
I personally like AWS Lambdas very much and am always looking for interesting use-cases, like this one. I don't quite get what your code is supposed to do yet, but I have some initial comments about the implementation, hope it's ok.

There are two things that glare at me immediately, a) the vendoring of the redis code (including pyc files) and b) the need to define static credentials in the code itself.

There are two little tools I would like to point your attention to, that may ease this pain.

Here is a pybuilder plugin to make deploying lambdas much easier, it can generate a lambda-zip for you (including all dependencies) and upload it to S3 so that you can use it in a CFN template:

https://github.com/ImmobilienScout24/pybuilder_aws_plugin

The second is a tool to configure lambdas, by placing "things" (e.g. redis creds) in the description field of the lambda. This way, you can speparate code and configuration cleanly:

https://github.com/ImmobilienScout24/aws-lambda-configurer

1 comments

Thanks a lot! I was looking for ways to separate configuration from code, but couldn't find anything. Similarly "packaging" this so it's easy to share and for other people to use, I couldn't really find any common solution. I'll take a look at your suggestion! Much appreciated.
You are most welcome, our code is still really fresh so if you do hit any snags we'd love to hear from you! Any and all feedback is welcome!