
Elastic PyPI: your own Python Package Index on AWS Lambda - di
https://github.com/khornberg/elasticpypi
======
_wmd
This is a really cute use for Lambda, and a great working example of the kinds
of limitations one could expect to bump into.

I was recently asked to evaluate Lambda for use in hosting a bunch of existing
web sites, and just from README.md, I'm glad I backed the hell away from that
pandora's box before opening it.

~~~
Ysx
Binary uploads are a new APIG feature[1] awaiting Serverless support[2].

Surprised WWW-Authenticate headers aren't passed through. May be possible with
custom authorizers[3], though it's extra complexity.

\---

[1] [https://aws.amazon.com/blogs/compute/binary-support-for-
api-...](https://aws.amazon.com/blogs/compute/binary-support-for-api-
integrations-with-amazon-api-gateway/)

[2]
[https://github.com/serverless/serverless/issues/2797](https://github.com/serverless/serverless/issues/2797)

[3]
[http://docs.aws.amazon.com/apigateway/latest/developerguide/...](http://docs.aws.amazon.com/apigateway/latest/developerguide/use-
custom-authorizer.html)

------
jamiesonbecker
This is a perfect use for Lambda (i.e., low-traffic, once-off tasks that don't
require a full server), or at least this would be a good fit if not for
immaturity issues like missing WWW-Authenticate.

But Lambda _at scale_ is very expensive. A 100 request/second would cost more
than $1,500/month, when even a single nano server could easily service that
kind of load all by itself.

Back of napkin analysis:
[https://twitter.com/JamiesonBecker/status/802185522139582464](https://twitter.com/JamiesonBecker/status/802185522139582464)

Lambda is great for tech demos, small or rare loads, triggered tasks, etc. Not
so great as part of your core app pipeline.

~~~
takeda
Is it? I thought S3 would be a better fit.

------
saamm
Hosting a PyPI index on S3 is simpler, but I admire the effort here!

------
CaliforniaKarl
This is cool, but it makes me sad that it has to run on Python 2, as Lambda
does not natively support Python 3.

(And no, I'm not counting tricks like calling into the underlying OS' Python
3)

