aws lambda

21
AWS User Group Italy Meeting Rome AWSUGIT Meeting @ Roma

Upload: danilo-poccia

Post on 18-Jul-2015

230 views

Category:

Documents


1 download

TRANSCRIPT

AWS User Group Italy MeetingRome

AWSUGIT Meeting @ Roma

AWS User Group Italy MeetingRome

AWS LAMBDA Danilo Poccia – AWS Technical Evangelist @danilop

NEW CLOUD APPLICATIONS MODELS

SIMPLE PROBLEMS Thumbnail images as they arrive in a bucket Check email addresses stored in DynamoDB

1.  Provision a fleet of proxy machines to capture data uploads.

2.  For each upload, enqueue a job to process it. 3.  Provision a second fleet of machines to read and

process jobs. 4.  Pick a deployment solution. 5.  Plan capacity, accounting for fault tolerance, good

long-term utilization, burst capability, etc. 6.  Monitor 24x7x365 for capacity, health, security, etc. 7.  Migrate to new instance types over time, keeping

OS and language runtimes patched and up to date.

WHAT ARE THE PRIMITIVES OF AN APPLICATION?

Interactions Communicated

via events

Functions Data

The Magic Happens at the Intersection of Functions, Events and Data

(Pretty much everything else is glue or UI)

Driving Data with Events and Functions… Composable

Build small functions, quickly

Easy to update Add new

functionality safely and easily

Dynamic Data is always kept

up to date

Why don’t we architect like this today? Complex

Need to manage a full stack for every function

Expensive Some functions run

very infrequently

AWS LAMBDA STATELESS, EVENT-DRIVEN COMPUTE CODE CALLED “LAMBDA FUNCTIONS”

TRIGGERED BY EVENTS IN OTHER SERVICES

•  Put an object in an Amazon S3 bucket •  Write to a DynamoDB table •  Message in an Amazon Kinesis stream

EVENT-DRIVEN COMPUTING

AWS LAMBDA IS THE CONNECTIVE TISSUE BETWEEN SERVICES

Data Triggers: DynamoDB

AWS Lambda λ

DynamoDB Table and Stream

Send Amazon SNS notifications

Update another table

Audit and Notify

AWS API calls

AWS CloudTrail Logs

AWS Lambda λBucket events Amazon SNS

notifications

Custom Events

AWS Lambda λ

Data Triggers: Amazon S3

Amazon S3 Bucket Events AWS Lambda λ

Original image Thumbnailed image

1

2

3

NO INFRASTRUCTURE TO MANAGE

Focus on business logic, not infrastructure Upload your code, Amazon Lambda handles:

•  Capacity •  Scaling •  Fault tolerance •  Monitoring •  Logging…

AUTOMATIC SCALING Each object uploaded to Amazon S3 is an event

Each event is a Lambda request Lambda scales to match the event rate

Don’t worry about over or under provisioning Pay only for what you use

FINE GRAINED PRICING Price compute time by 100ms

(so even short jobs make sense) Low request charge

No hourly, daily, or monthly minimums

PREVIEW OPEN TO EVERYBODY: AWS.AMAZON.COM / LAMBDA SUPPORT FOR AMAZON S3 AND AMAZON KINESIS

AMAZON DYNAMODB STREAMS PREVIEW