3. @acankr
ECONOMICS OF APPLICATION VIRTULIZATION ON AWS
▸ 64% or cloud costs refers to EC2 Instances
▸ 53% workloads Small Instances
▸ 29% workloads Medium size
https://goo.gl/1pmqKD
4. @acankr
ECONOMICS OF APPLICATION VIRTULIZATION ON AWS
▸ 64% or cloud costs refers to EC2 Instances
▸ 53% workloads Small Instances
▸ 29% workloads Medium size
▸ 16.7% Small instance utilization
▸ 11.9% Medium instance utilization
https://goo.gl/1pmqKD
6. @acankr
CHALLENGES OF RESERVED INSTANCES
▸ Use only what you need
▸ Choose right size for instances
▸ Use Reserved instances
▸ Expect project run for short time
▸ Undecided about project size
▸ Fear of commitment
11. @acankr
WHAT IS SERVERLESS
Lambda
CodeCommit
SmartHome
AlexaSkill IoT
API Gateway
S3 Storage
CloudWatchEvent
Logs
SNS
Kinesis
Messages
DynamoDB
Internet of Things
Streaming
Development and Ops
Security
Trigger Event AWS Service
Container
Application CodeCognito
12. @acankr
▸ Price: $0.208 - $2.501 per 1M executions
▸ RAM: 128MB - 1536MB
▸ vCPU Cores: 2
▸ Ephemeral Disk: 512MB
▸ Write Partition: /tmp/*
▸ Timeout: 300sec
▸ Body Payload: 6MB
]▸ Price: $0.023 per Hour (t2-small)
▸ RAM: 2GB
▸ vCPU Cores: 1
▸ Ephemeral Disk or EBS
▸ Timeout: no
Lambda EC2 (VM)
VS
13. @acankr
▸ NodeJS 4.6
▸ NodeJS 6.10
▸ Python 2.7
▸ Python 3.6
▸ Java 8
▸ C#
▸ EdgeJS 4.6
]
Language Runtimes
CONFIGURATION MANAGEMENT
SECRET MANAGEMENT
SERVICE DISCOVERY
EXPOSURE AND AUTH
PRIVATE CLOUD ACCESS
APPLICATION DEVELOPMENT SERVICES
27. @acankr
API Gateway
Lambda
+
- API Management Tool
- Authorization + Custom Authorizer
- Defines: Environment Variables for Lambda
- Can be defined with Swagger and imported
- Code Supports Versioning
- Integrated with CloudWatch
- Lambda Containers are Cached for 5 minutes
- Can be deployed with “apex.run” tool
- User can write files in /tmp
38. @acankr
▸ Model flows of Lambda Functions
▸ Conditional flows
▸ Design error handling
▸ Design conditional execution
▸ Output of previous function will be input of next
40. @acankr
GET
Static HTML
CSS/Media
Rich JavaScript Apps
S3 StorageCloudFront
GET
POST
PUT
DELETE
Dynamic Data
Data from Database
Data from External Service
dataAPI Gateway Lambda
ajax
http
event
USER
DynamoDB
R53 Domain
example.com
42. HIPSTER PORTAL
"...USE GIT AS THE BASIS FOR A LIGHTWEIGHT CMS, WITH TEXT-BASED EDITING FORMATS. GIT
HAS POWERFUL FEATURES FOR TRACKING CHANGES AND EXPLORING ALTERNATIVES, WITH A
DISTRIBUTED STORAGE MODEL THAT IS FAST IN USE AND TOLERANT OF NETWORKING ISSUES."
ThoughtWorks Technology Radar
https://www.thoughtworks.com/radar/techniques/git-based-cms-git-for-non-code
assess since May 2015
43. @acankr
Lambda
+ - Lambda doesn’t have GIT client.
- You can “statically link” git libraries with
git2go library (libgit2)
- To read SSH key file with Lambda it must be stored
in “/tmp” directory
- SSH private key must have 600 credentials
- SSH private key must be owned by user “sandbox”
Code Commit
- Git Repository Service
- Backed by S3 storage
- Price: $1 per user
- Only: us-west-1 region
48. @acankr
TAKEWAYS
▸ Optimize for what you use
▸ Split deployment code to: initial and incremental
▸ Lambdas are best for rare events (cluster events, chatbots etc)
▸ Lambdas bad for UI
49. @acankr
FRAMEWORKS
▸ All frameworks we checking are limiting
▸ CloudFormation and Terraform for initial deployment
▸ Serverless to support Lambda on NodeJS
▸ Chalice for Python runtime
51. @acankr
Book: AWS Lambda in Action MEAP
Begin in 2016 February
Publication: March 2017
Author: Danilo Poccia
ISBN: 9781617293719
https://www.manning.com/books/aws-lambda-in-action