This document provides an overview of serverless services on AWS. It describes 8 AWS services including Lambda, S3, DynamoDB, API Gateway, SNS, IoT, SES, and SQS. It provides examples of how to build a serverless blog application using these services, with the application assets stored in S3, API Gateway invoking Lambda functions, and blog data stored in DynamoDB. The document also discusses the Serverless Framework for developing and deploying AWS Lambda solutions and provides pricing models for various serverless services.
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Helsinki Serverless Meetup 15.6.2016 : AWS Services
1. SERVERLESS SERVICES ON AWS
Mikael Puittinen, CTO
mikael.puittinen@sc5.io
@mpuittinen
1
15.6.2016
2. 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 NotificationService)
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
4. 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
5. 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
6. 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)
7. 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
8. 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)
9. SERVERLESS WORKSHOP
If you are interested in getting hands-on experience,
please check out our serverless workshop at
http://hackathon.serverless.fi/workshop.pdf
11. 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
12. 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
13. 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
14.
15. CLOUD NATIVE APPLICATION
ARCHITECTURE À LA SC5
Reference Architecture
AWS IoT
Amazon
S3
Amazon
DynamoDB
Amazon
RDS
Amazon
SNS
Amazon API
Gateway
AWS
Lambda
E.g.App assets
(HTML5)
App
Notifications
App Data
(REST)
Device data
(MQTT)
Compute Database
Serverless Development
Framework
17. SERVERLESS FRAMEWORK
§ Node.js based framework for
development and deployment
of AWS Lambda-based
solutions
§ Extendible via plugins
§ Initially JAWS but rebranded
to Serverless in Dec 2015
> npm install –g serverless
> sls project create
> sls resources deploy
> sls function create
> sls function deploy
> sls endpoint deploy
> …