News for hackers. Stuff that matters.
Re:Lambda@Edge – Preview by scrollaway on Thursday December 01, 2016 @05:20PM (#13084103)
So we're getting C# and a new Node.js runtime for Lambda. Jeff, surely you're reading this - when are we getting Python 3 support as an additional runtime?

I've been waiting for months for re:invent in the hope that it would be announced today, only to be disappointed. I'm not the only one in this situation: stuck on Python 2.7, hitting issues left and right because of an ancient runtime that we no longer would care about were it not for Lambda.

Just today I hit another issue in production which impacted our webhook system. Wouldn't you know it, `json.dumps()` produces illegal json in Python 2.7 when you give it an IntEnum:

    >>> from enum import IntEnum; from json import dumps, loads
    >>> class E(IntEnum):
    ...  A = 1
    >>> dumps(E.A)
    'E.A'
    >>> loads(dumps(E.A))
    Traceback (most recent call last):
    ...
    ValueError: No JSON object could be decoded
Please. Do something about this. It's wasting so much time :(
Re:Lambda@Edge – Preview by Mizza on Thursday December 01, 2016 @05:24PM (#13084130)
Was really expecting a lot more out of the announcements today as well. Python3, GPUs, custom containers, larger packages.. the list goes on..

That being said, re: Python 3, you should keep a close eye on Zappa (https://github.com/Miserlou/Zappa) - as we've got a surprise in store that may delight you!

Re:Lambda@Edge – Preview by movedx on Thursday December 01, 2016 @06:04PM (#13084450)
So this looks very cool. Great job... but...

It would be pretty simple to wrap this up and automate it easily using a Terraform file. All it requires is an S3 resource for the ZIP, a Lambda resource using the S3 resource for the code, and finally an API Gateway resource to tie it all together.

Thoughts?

Re:Lambda@Edge – Preview by Mizza on Thursday December 01, 2016 @06:13PM (#13084524)
...but why?

We already use CloudFormation under the hood for the API Gateway, though to be honest I'm seriously considering moving away from it because it's so fickle.

There are also some security disadvantages and other problems from using CloudFormation for maintaining Lambda functions, plus you lose out on all the extensive functionality we provide. We're pretty damn well battle tested to avoid that stuff now.

Re:Lambda@Edge – Preview by movedx on Friday December 02, 2016 @06:27AM (#13087756)
Well, by using Terraform you're opening up the door to using other Lambda offerings as they pop up from other venders (and become supported by Terraform, of course.) CloudFormation is nice, and in your case it makes perfect sense given you're offering a Lambda specific service, but in the grand scheme of things I don't believe it's the best solution "all round."

What you're offering is awesome, for the record. I think it's a good idea, I think it's powerful, I think it's fast. It's a good idea and you should keep working on it.

However, it's a single, small Terraform file worth of work from my perspective.

Re:Lambda@Edge – Preview by scrollaway on Thursday December 01, 2016 @05:32PM (#13084196)
I've looked at Zappa in the past; it's very impressive, but it's overkill for what we're doing - we're only processing files and running a Django ORM instance behind it. And because we have quite a high throughput, running a Python 3 shim behind Python 2 would increase our costs by too much.

Thank you for making it though. It's a really cool part of the Lambda ecosystem. Excited to hear there's something in store for Py3 :)

Re:Lambda@Edge – Preview by deegles on Thursday December 01, 2016 @07:00PM (#13084787)
I found this: http://www.cloudtrek.com.au/blog/running-python-3-on-aws-lam...

Looks like you have to jump through a couple of hoops but that might work for running Python 3.

Re:Lambda@Edge – Preview by scrollaway on Thursday December 01, 2016 @07:59PM (#13085105)
This damages performance greatly. It's not worth it for us, would increase costs too much.

https://news.ycombinator.com/item?id=13084196