8 ms·
Support for tagging of Lambda functions and for the Python 3.6 runtime
- QuinnyPig 9y agoDon't bury the lede; we get tagging too!
- sctb 9y agoThanks, we updated the title from “AWS introduces lambda support for python3.6” a little while ago.
- INTPenis 9y agoYeah but in what region? As a european I've been disappointed before by lack of python support in european regions. Edit: Just noticed in my AWS account that there's 3.6 in Europe. This will get me away from GCP.
- StreamBright 9y agoIs there a particular reason of getting away from GCP? I am just curious.
- submeta 9y agoWould like to know that as well :)
- INTPenis 9y agoGrass is greener and I already have two major projects that require me to use python 2, excl. ansible modules, so I don't want more. I want to use european regions for my testing, not us. Other than that I find the GCP interface easier to work with, when it's working. I'm eager to try AWS.
- wging 9y agoThe page says "NOTE: These features will become available in all AWS Lambda regions within 24 hours."
- nikolay 9y agoNo CloudFormation support for tagging and embedding python3.6 code in the templates - they really do their best to push us away from using CloudFormation!
- movedx 9y agoGood. Use Terraform instead :)
- takeda 9y agoCan Terraform do that?
- svdgraaf 9y agoThey do get their tags automagically from the CF stack, right? (haven't tested it myself, but that's usually what happens)
- nikolay 9y agoNo, they don't. You can't even specify template-level tags in the template. I think they have very incapable developers on the CloudFormation project. This could have been a game changer, but it's been a source of pain. For example, they introduced YAML, and !Sub, but you can nest tags, yet, !ImportValue in many cases needs a nested !Sub. So, also, you can't have "$", "{", and "}" characters in the exported name, but they didn't add string templates to functions such as !ImportValue. Total nonsense! Also, as you've assumed logically, all stack resources need to inherit the tags of the owner stack, but no, you have to do tons of copypasta! Last, but not least - it's all designed that the templates are stored on S3 - most people use source control. Their other services already support Git - Elastic Beanstalk, CodeBuild, CodePipeline, etc. Why they don't allow Git-hosted templates?! Anyway, when I see the complexity of my templates to have a basic Magento infrastructure running in VPC, which I've been working on, it's very disgusting. Lots of manual steps if you don't want to have a monolithic template, lots of CLI, and build steps. This is not how things like these should be implemented in 2017! Lastly, they introduced CloudFormation exports. Okay, decent feature, but not in the real world! So, if you refactor your infrastructure, it becomes a huge pain as you cannot delete exports for some reason - they belong to the stack. So, if I decide to rename or split an export, I need to have an intermediate step, which duplicates the old and the new exports, I updated all importing stacks, to use the new values, and so on. Most AWS resources have "retain" capability - S3 buckets, ECRs, Route 53 records, etc. - CloudFormation exports don't! Honestly, they need to put some more experience and brighter developers on the team!
- scrollaway 9y agoFinally!! Thank you Amazon. ... I know what I'm doing tomorrow. Edit: I know what I'm doing today.
- abhirag 9y agoFinally Zappa(https://github.com/Miserlou/Zappa https://github.com/Miserlou/Zappa) would be able to support web services written in python 3!
- Mizza 9y agoYep! Follow the progress here: https://github.com/Miserlou/Zappa/issues/793 https://github.com/Miserlou/Zappa/issues/793
- ak217 9y agoI much prefer Chalice (https://github.com/awslabs/chalice https://github.com/awslabs/chalice) which just got a synchronized release supporting Python 3 as well.
- scrollaway 9y agoHave you tried both? Can you explain what you prefer in Chalice over Zappa?
- ak217 9y agoYes. In my impression Chalice is designed to be a microframework (emphasis on micro) with the bare minimum of glue necessary to make deploying Lambda apps easy. Zappa is designed around an ill-fitting API (while WSGI is widespread, it's clunky and a layering violation of sorts when put in the Lambda runtime environment) and has a development philosophy that I don't agree with.
- Mizza 9y agoI wrote up a comparison of the two here: https://blog.zappa.io/posts/comparison-zappa-verus-chalice https://blog.zappa.io/posts/comparison-zappa-verus-chalice Zappa has even more features now. Basically, you can't even build real server-less apps with Chalice, plus Zappa has support for tons of other magic features.
- wahnfrieden 9y agoI stopped using Chalice in favor of Zappa because Zappa made it trivial to run a local dev environment (it's just Flask/Django/WSGI). Have I missed something about this with Chalice?
- IanCal 9y agoWell this will drastically clean up some code I've just written! I was using 2.7 for the lambda code and 3.x for the rest of the processing.
- jgill 9y agoWhat about Python 3.6 support for ElasticBeanstalk?
- kinghajj 9y agoAt least you can use the Docker environment type and deploy your own image with Python+your code.
- Alex3917 9y agoIf you want to spend multiple weeks rewriting your deployment process. EBS promised a new Python image a few months ago, and now that Django 2.0 is going to drop support for 3.4 by the end of the year it's getting to be time for them to deliver on that.
- ak217 9y agoThis is awesome. If you're deploying stuff with Python on Lambda, I highly recommend checking out Chalice (https://github.com/awslabs/chalice https://github.com/awslabs/chalice) and also an extension to it that I wrote for using Lambdas on SNS/S3/Cloudwatch events or scheduled events - https://github.com/kislyuk/domovoi https://github.com/kislyuk/domovoi (which I now need to go update to support this as well).
- Mizza 9y agoZappa can do all of that and more out of the box: https://github.com/Miserlou/Zappa https://github.com/Miserlou/Zappa Comparison: https://blog.zappa.io/posts/comparison-zappa-verus-chalice https://blog.zappa.io/posts/comparison-zappa-verus-chalice It also lets you build fully-fledged event-driven apps with a single line of code: https://blog.zappa.io/posts/zappa-introduces-seamless-asynchronous-task-execution https://blog.zappa.io/posts/zappa-introduces-seamless-asynch...
- brian_herman 9y agoZappa is amazing I am currently using it to make an alexa app.
- revicon 9y agoAWS now has Sam which I hadn't heard of before. It's an extension of cloud formation specifically for deploying serverless code to lambda, building API gateways etc. Their command line tool is pretty slick, I'm wondering if these other third party frameworks are needed anymore.
- ak217 9y agoSAM solves a different set of problems from the frameworks like Chalice. It does not address the app request/response API, deployment package building process and dependency bundling, the test-development cycle, routing and other API Gateway configuration specifics. Also, Chalice is a first party framework in that it's led by an AWS affiliated developer.
- andrewstuart 9y agoIt was strange that it ever supported Python 2 given how recent the AWS Lambda Python product is - they could have avoided the support burden of Python 2 entirely.
- m23khan 9y agoThank you AWS Team!! Can now look forward to moving ahead with python3 dev fully
- wahnfrieden 9y agoTangent: anyone find a satisfactory way to do blue/green or canary deployments with Lambda?
- mason55 9y agoCreate a new alias with a unique ID for each lambda deployment. Then manage your application to point at the proper alias. Roll out just becomes updating the apps however you update them normally.
- abalone 9y agoMaybe tangential but how do people feel about implementing a typical RESTful database API in Lambda & API Gateway? Most of the prototypical examples of Lambda I see are for things like data processing pipelines. I know in theory Lambda should be able to handle just about any kind of request from a browser or mobile app short of a websocket connection, and Amazon does have some sample code and a brief case study on their site. But I'm wondering if it's really ready for this or if people have experiences going near-100% serverless for their apps.
- vidar 9y agoI would be very interested in the answer to this question. If it can surpass Flask in terms of simplicity in creating a simple REST API it would be a major milestone.
- scrollaway 9y agoI find it to be an antipattern. Lambda excels at taking in arbitrary amounts of long-running jobs and feeding you its output. For example: Upload a png image to convert it to jpg. Zip a directory of S3 objects. Etc. Lambda gets very costly and inconvenient when you're just taking in requests you could handle by a couple of load-balanced web servers. The whole "running a whole website on Lambda" craze does not actually yield any benefit and is more complex, harder to play with than a simple ec2 instance (which, with a good setup, needs very little "server" management at all). Also, API Gateway is just horribly inflexible imho.
- abalone 9y agoI've heard API Gateway is painful to configure but that frameworks like serverless.com help a lot. But I'm surprised to hear that Lambda gets costly. Is this from real experience or is it just theoretical? My impression was that Lambda saves you money by not having to pay for excess capacity. But I haven't done the math. I'll admit, it's also appealing to not even have to worry about configuring a web server cluster to scale up and down.
- scrollaway 9y ago
- Rapzid 9y agoIt's a shame boto3 doesn't support async...
- braidenj 9y agoCloudFormation has developed support for Lambda tagging, Python3.6 and Node6.10 inline code and it will be part of our next release. Keep an eye on https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGui... for more details.