A comprehensive introduction to Serverless technologies, available tools both cloud independent and AWS specific, plus some use cases with architecture discussion
Working on a lot of bleeding edge technologies • Passionate developer: love writing code, hate meetings The Neosperience Cloud • Software as a service cloud for Digital Customer Experience processes (Psychographics, Loyalty & Gamification, Proximity, Content, etc.) • Built on AWS, 95% on Serverless technologies • Moved from VMWare, to EC2, to Elastic Beanstalk, to Serverless • Dozens of micro and nano services The Digital Customer Experience Company, aims to change the way brands and customers interact with an approach of a software vendor targeting Digital Customer Experience as the evolution of Marketing automation.
456 members and growing Hosted the first italian JeffConf (https://goo.gl/mqvnsR) Monthly meetup Events with other communities Wants to build a network of serverless meetups
streams and triggers Serverless development, tools and vendors Use Case: your nightmare before Christmas The good, the bad and the ugly of Serverless development A point on Serverless architectures
ephemeral compute power that comes into existence on request and disappears immediately after use. Use of this architecture can mitigate some security concerns such as security patching and SSH access control, and can make much more efficient use of compute resources. These systems cost very little to operate and can have inbuilt scaling features.” — ThoughtWorks, 2016
great way to decouple services • largely abused in the last decade (ESB) • now revamped with CQRS and Event Sourcing to handle microservices communication • serverless functions handle events • need a different approach on architectures
code without provisioning or managing servers. AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second. Service released on Nov, 2014 Introduces Event-Driven programming model Provides a context and an event object AWS Lambda
A scripting language for the cloud Defines AWS resources (Lambda, S3Buckets, DynamoTables, etc) Manages resource lifecycle Example: creating a DynamoDB Table https://docs.aws.amazon.com/AWSCloudFormation/ latest/UserGuide/Welcome.html
(e.g. AWS::Serverless::Function) Pretty similar to Serverless Framework’s syntax (yaml) Natively supported by AWS SAM Local (github.com/awslabs/aws-sam-local)
infrastructure to manage (your IT guy has a family, too) Scales up to production requirements Can be released within minutes Use DynamoDB and GSI Serverless does not mean spaghetti-code!
Test environments IAM permissions management DynamoDB scales automatically Serverless strips unwanted dependencies A/B testing with Lambda is very easy Progressive rollout are made possible with a single click
every service is scriptable Support for 3rd party services is very bad No Lambda lifecycle callbacks Lambda cold start matters No GPU support (yet) Serverless Framework is not an AWS tool
Compute, presented to the ServerlessConf the so-called Serverless Manifesto. • In 2017 Danilo Poccia, Technical Evangelist @ AWS, talking at JeffConf asked “what would be having that manifesto translated into a checklist to evaluate Serverless compliance of an architecture?” • So, we turned it into a “Serverless Scorecard” Evaluating a serverless architecture (aka how big is my serverless?) The Serverless Scorecard Function as the unit of deployment and scaling Implicitly fault-tolerant Metrics No machines, VMs, or containers Bring Your Own Code Stateless Never pay for idle Scales per request
(hibernation) Integrated web terminal * (EC2 or SSH environment) Built-in Lambda support Live debugging capabilities (only Node.js for now) Collaborative coding/debugging * No SSH keys or IAM credentials to configure locally (!) SAM-local integration (local testing & deployments)
100 per account Max 10 open env per user Max 8 members in each env EC2 instance maintenance is still on you (OS updates, etc.) No Python debugging No “offline” support Only SAM-focused Lacking AWS Console integration “Primitive" Lambda testing ⚡ (e.g. no event generation)