4 ms·
We built Kappa[0] to handle our production Lambda deployment. It was built by the same person who wrote Boto and the AWS command line. Here is an example[1] o
by jedberg 11y ago
We built Kappa[0] to handle our production Lambda deployment. It was built by the same person who wrote Boto and the AWS command line.
Here is an example[1] of a program built in Python that uses Kappa, and here is a video tutorial[2] on how I deploy that program with kappa.
Obviously I disagree with the premise. It's true that it is more difficult to use than other technologies and you'll certainly pay the pioneer tax, having to develop your own tooling, but it's ready for production traffic.
Error handling is ok, could be better (it takes a while for the cloud watch log to show up).
The real big problem is testing. It's really hard to test if you have more than one function because there is no mocking framework (yet). It's fairly easy to deploy and test with a test account, but local testing still needs to be solved.
[0] https://github.com/garnaat/kappa https://github.com/garnaat/kappa
[1] https://github.com/jedberg/wordgen https://github.com/jedberg/wordgen
[2] https://www.youtube.com/watch?v=JtLLkCt-lPY&feature=youtu.be https://www.youtube.com/watch?v=JtLLkCt-lPY&feature=youtu.be
- scrollaway 11y agoMy main issue with lambda so far has been its lack of Python 3 support. I do not understand why there isn't a 3.x runtime available. We have a 3.5 compatible app with parts that depend on 3.4, and we had to cut it in two and cripple it to make it work with lambda.
- jedberg 11y agoYeah, that's the biggest problem. It's bugs me too. I'm sure it is coming soon, but the again, most of the big hosted python installs don't support 3.x yet (App engine being the big one).
- brianwawok 11y agoApp engine has 3.4 on their beta flavor right? But yes in 2016 everyone needs day 1 Python 3 support. Python 2 support is optional.
- daveguy 11y agoObviously that is not the case.
- brianwawok 11y agoWhy not? I can't image rolling out a new python hosting product in 2016 and not even covering python3 ?!?!?
- markbnj 11y agoI don't know why you would say that. I'm sure it would be great to support Python 3, but saying that Python 2 is optional is a little strange.
- WorldMaker 11y agoIt's easier to make Python 2 code run on Python 3 than Python 3 code run on 2. Why shouldn't Python 2 be optional at this point? It's the version in maintenance-only mode. Python 2 is the VB6 of Python and it seems clear to me that it should be optional going forward for people spending support time on it.
- vorador 11y agoAs much as I'd like everybody to be using Python 3, the truth is there's not a lot of immediate benefits, which is why 85% of Python users are still using 2.x.
- WorldMaker 11y agoAs a Python user myself, the better, more reliable Unicode-by-default string handling in Python 3 is more than enough of an immediate benefit that I've stopped installing Python 2.x on my devices entirely at this point. Obviously, ymmv, but there seem to me to be a lot of immediate benefits to Python users and what feet dragging remains to stay in 2.x seems more like a political protest of some sort than one focused on actual benefits.
- JPKab 11y agoI've heard that the foot-dragging on Python is due to the senior technologist at AWS not liking the language and/or not taking it seriously. Anyone else heard the same?
- ak217 11y agoThey upgraded their Node runtime from the legacy 0.10 to 4.2LTS... I'm having a hard time imagining a reason to hate Python that doesn't also apply to Node. Lack of a JIT? (It would be awesome to have Lambda + PyPy + 3.5... though that is of course not yet ready on the PyPy side.)
- abstractbeliefs 11y agoWhile I can't say I know anything more about python and aws specifically, hate doesn't have to be logical. Someone might hate python just because.
- badsock 11y agoLambda can run arbitrary executables, including a Python3.5 interpreter. Admittedly it's a little silly to have a Py2 script that does nothing but start up Py3, but it's better than cutting and crippling, I'd bet.
- balls187 11y ago> Lambda can run arbitrary executables Linux executables. During re:Invent 2015 there was talk about supporting a windows runtime environment.
- scrollaway 11y agoWell if it can run arbitrary executables, it can run Wine! :)
- OJFord 11y agoWhat is the definition of "Linux executable" that excludes `python3`? Builtins?
- balls187 11y ago??? Arbitrary Executables = Arbitrary Linux Executables. Since Python3 runs on linux, you can invoke python3 scripts.
- OJFord 11y agoOh, sorry, I agree. I thought you were disagreeing with parent; saying "it doesn't run arbitrary executables, it only runs linux executables". Although actually, I see what you mean now. D'oh. Windows was so far out of my mind I wasn't even thinking of it as a distinction to be made.
- deusex_ 11y agothat's what I love about Lambda. You CAN test against the online environment, since it costs almost literally zero. there are very few times where you are offline and would like to run a test suite, but it's much easier to handle those than try to fake the service AWS provides
- scrollaway 11y agoWhy would you use prod lambda in your test suite? Latency and other issues aside, that requires pushing your environment to a lambda (which can take a massive amount of time especially with larger uploads) to run a test suite that's supposed to take a couple of seconds.
- encoderer 11y agowe need to create a new build in order to deploy it anyway. The build is hit with some interaction tests. Because config is passed in and not hard coded into the buil it just works. After tests pass the build can be promoted to production alias.
- danpalmer 11y agoRequiring an internet connection for normal development seems a bit extreme. That rules out using it in many places in the world where the internet is slower or less stable, and even here, we have developers who work on their commute with no internet connection.
- lairdpop 11y agoThat's certainly true. Useful Lambda code (i.e. lots of functions cooperating to do something, likely using a variety of AWS services) can only run in the Lambda context. So it's not appropriate if you need to develop offline.
- zamalek 11y ago> It's really hard to test if you have more than one function because there is no mocking framework (yet). I'm not sure how this applies to Lambda, but we've found a workable solution for Service Fabric: the services and actors are almost nothing more than a thin host for the actual implementation (or are DI'd into the implementation) - which is defined in a completely separate package/assembly.
- ben11kehoe 11y agoWe are finding that unit testing is pretty straightforward with Placebo [0] (also Mitch Garnaat!), for which we use a common "boto client getter" library that the unit test framework can hook into to inject Placebo. The really hard part is integration testing. You can Chaos-Monkey your Lambda functions, but you can't Chaos-Monkey DynamoDB. We're looking at ways of building tooling to do that. For deployment, we wanted to use Serverless, but as they started to move away from CloudFormation, that didn't work for our more enterprise needs, so we've been rolling our own, based on ideas from Kappa. [0] https://github.com/garnaat/placebo https://github.com/garnaat/placebo
- matlock 11y agoHey Ben, we're going to build completely on top of Cloudformation in the next version of Serverless. Currently starting to work on it. If you're interested would love to get your feedback: florian@serverless.com
- jedberg 11y agoMitch actually built Placebo alongside kappa, because he needed a way to test kappa. He even submitted a pull request against boto to make it support placebo. Sadly though, placebo is better for mocking the other AWS services, not so much a mesh of Lambda functions. Have you guys figure out a way to do offline testing of one Lambda calling another? I'd love to see it!
- ak217 11y ago> you can't Chaos-Monkey DynamoDB I bet you could achieve this effect by either temporarily decreasing provisioned throughput, or inserting clientside middleware that occasionally refuses to do a DynamoDB op.
- jedberg 11y agoThe middleware would be best option. Put it between your code and the calls and then have it able to throw random errors. But it means you have to write the middleware and have it be it's own source of bugs, which is still better than nothing, but another risk.
- gumuz 11y agoThanks for kappa, I really like the idea, but it currently seems a bit "broken/unmaintained", is it still actively developed?