2. Who am I?
• Chief Technology Officer @ Neosperience
• 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.
3. Serverless Meetup
Began as a joke, after too many beers
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
5. Agenda
“Serverless” disclaimer
What is “Serverless”?
The Serverless Manifesto
Events, 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
8. What is Serverless?
“Serverless architecture replaces long-running virtual machines with 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
9. The Serverless Manifesto
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
10. It all started with an event..
• events are a 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
11. AWS Lambda is a compute service that lets you run 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
14. CloudFormation
Cloud Services become a part of your project
Infrastructure-as-code
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
19. What is AWS SAM?
github.com/awslabs/serverless-application-model
“The goal of AWS SAM is to define a
standard application model for
serverless applications.”
20. In other (technical) words?
AWS::Serverless Transform
(CloudFormation)
Special serverless resources
(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)
21. AWS SAM Example (Function)
(plus policies, VCP config, DLQ, tracing, etc.)
22. AWS SAM Example (Traffic Shifting)
(plus alarms & pre/post-traffic hooks)
30. IDEA: Make it Serverless!
Focus only on your code
No 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!
35. The good
Fast deployments
Serverless.yml makes things easy
Infrastructure versioning
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
36. The bad
CloudFormation is not so easy to write
Not 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
37. The ugly
Lambda support is up to NodeJS 6.10
Maximum resorce limit up to 200
CloudFront distribution needs some tune-up
Communication between Lambdas is up to you
42. • In 2015 Tim Wagner, General Manager @ AWS Serverless 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 CodeStateless
Never pay for idleScales per request
47. AWS Cloud9 Features
Full-fledged IDE & Dev tools
Cost-saving settings (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)
50. AWS Cloud9 Limitations & “wishes”
Max 20 env per user, 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)