helsinki serverless meetup 15.6.2016 : aws services
TRANSCRIPT
SOME AWS SERVICES FOR DEVELOPERS (8 OUT OF 55)
COMPUTE
Lambda 2014
STORAGE
S3 (Simple Storage Service) 2006
DATABASE
DynamoDB 2012
MOBILE SERVICES
SNS (Simple Notification Service)
INTERNET OF THINGS
IoT 2015
APPLICATION SERVICES
API Gateway 2015
SES (Simple Email Service) 2011
SQS (Simple Queue Service) 2006
Building blocks for digital services
SAMPLE BLOG EXERCISE ARCHITECTURE
3
AWS SERVERLESS WORKSHOP BLOG APPLICATION
Example 2
2. Web app communicates with
API Gateway for blog content
1. Application static assets (HTML, CSS, JS) served from S3 bucket.
5. Blog data managed in DynamoDB
database
http://hackathon-blog.serverless.fi
3. API Gateway invokes Lambda for incoming
requests
4. Lambda reads / writes blog data from DynamoDB
See workshop at http://hackathon.serverless.fi/workshop.pdf
SIMPLE STORAGE SERVICE (S3)
§ (Unlimited) file storage service
§ Application internal files
§ Static web content (e.g. application HTML / CSS / JS / image assets)
§ Can be complemented with Cloudfront CDN to optimize costs and performance
Serverless Storage
my-s3-bucket.company.com
PRICING: Storage volume + amount of requests
AWS LAMBDA
§ Compute service for running code (functions) in AWS
§ Event driven (API Gateway, SNS, SES, S3, DynamoDB, Schedule, …)
§ Provision memory & max time required by single function run
§ Additional ”instances” spawned automatically
Serverless Compute
myFunction
PRICING: Utilized gigabyteseconds (rounded to 100ms)
API GATEWAY
§ AWS Service to implement REST (and other) APIs
§ Security via API Keys, customer authorizers (Lambda)
§ Connect to e.g. Lambda to publish your functions as REST interfaces
§ Input / Output mapping (e.g. URL parameters -> JSON)
§ No need for provisioning
Serverless API Management
PRICING: # of requests + data transfer + cache size
INPUT MAPPING
OUTPUT MAPPING
AUTHORI-ZATION
JSON JSON
HTTPS
DYNAMODB
§ noSQL database provided by AWS
§ noSQL: scalable non-relational database with focus on speed
§ Work with tables and indices, no server instances to manage
§ Need to provision read / write capacity per table / index
Serverless Database
PRICING: Provisioned read / write capacity and storage (over 25Gb)
SERVERLESS WORKSHOP
If you are interested in getting hands-on experience, please check out our serverless workshop at
http://hackathon.serverless.fi/workshop.pdf
OTHER AWS MANAGED SERVICES & EXAMPLES
10
SIMPLE NOTIFICATION SERVICE (SNS)
§ Push notification service
§ Delivery not guaranteed
§ nly targeted for mobile notifications
§ Can also be used for triggering e.g. Lambda functions, mobile, email notifications
Serverless push notifications
PRICING: Amount of messages
1
SUBSCRIBE
PUBLISH
SIMPLE QUEUE SERVICE (SQS)
§ Message queue service (pull)
§ Delivery Guaranteed (order not guaranteed)
§ Prevent messages being handled by multiple workers
§ Can be handled e.g. by Lambda using a scheduled function
Serverless queue
PRICING: Amount of messages
(SCHEDULED) PULL
PUBLISH
AWS IOT
§ Device registry + API for communicating with devices + automated actions (Rules)
§ Authentication of devices
§ Devices can send current state and retrieve desired state over MQTT, Websocket
§ Can perform actions based on rules (e.g. Temperature reading from a specific sensor is out of bounds)
Integrate with devices
PRICING: Amount of messages
CLOUD NATIVE APPLICATION ARCHITECTURE À LA SC5
Reference Architecture
AWS IoT
AmazonS3
AmazonDynamoDB
AmazonRDS
AmazonSNS
Amazon API Gateway
AWSLambda
E.g.App assets(HTML5)
App Notifications
App Data(REST)
Device data(MQTT)
Compute Database
Serverless DevelopmentFramework
SERVERLESS FRAMEWORK
16
SERVERLESS FRAMEWORK
§ Node.js based framework for development and deploymentof AWS Lambda-basedsolutions
§ Extendible via plugins
§ Initially JAWS but rebrandedto Serverless in Dec 2015
> npm install –g serverless> sls project create> sls resources deploy> sls function create> sls function deploy> sls endpoint deploy> …
SC5 BRIEFLY
CLOUD SOLUTIONS
BUSINESS APPLICATIONS
DIGITALDESIGN
10YEARS
60+CUSTOMERS
200+ PROJECTS
HELJKL
75HACKERS
DESIGNERS
6MEUR2015
THANKS A LOT!https://sc5.io
19