aws lambda

13
1 05.07.2022 AWS Lambda Serverless, event-driven compute service 27.03.2017, AOE Developer Weekly, Julian Kleinhans

Upload: julian-kleinhans

Post on 06-Apr-2017

138 views

Category:

Services


0 download

TRANSCRIPT

Page 1: AWS Lambda

102.05.2023

AWS LambdaServerless, event-driven compute service27.03.2017, AOE Developer Weekly, Julian Kleinhans

Page 2: AWS Lambda

202.05.2023

Julian KleinhansSoftware Architect @ AOE GmbH

@kj187

Page 3: AWS Lambda

302.05.2023

What is AWS Lambda

Alternatives• Azure Functions (Microsoft)• OpenWhisk (IBM)• Google Cloud Functions (beta)

Serverless compute service that runs your code in response to events Introduced by Amazon in

November 2014First major provider

Page 4: AWS Lambda

402.05.2023

What means serverless

Serverless• No infrastructure to manage• Upload your code• Lambda handles Capacity, Scaling, Monitoring, Logging, Security patching ...

Focus on business logic

Not infrastructure

Page 5: AWS Lambda

502.05.2023

Events

Event Sources (Event sources that trigger AWS Lambda)

• Amazon S3• Amazon DynamoDb • Amazon Kinesis• Amazon API Gateway (REST API)• On Demand via SDK

• ...

approx. 16-17 services

Page 6: AWS Lambda

602.05.2023

Workflow

Changes in data state Request to endpoints Changes in resource state

Event source Function Services (anything)

Change/Add data state Trigger AWS resource Call HTTP endpoint

Page 7: AWS Lambda

702.05.2023

Function

Function handler

NodeJS 4.3 & 6.10Java 8Python 2.7C#

Golang via NodeJS:child_process

ZIP Packagehandler.jsnode_modules/*

Page 8: AWS Lambda

802.05.2023

Use Case

1

2

34

Store image in S3

Lambda Event Trigger

Create thumbnail

Store thumbnail in S3

Page 9: AWS Lambda

902.05.2023

Use Case

E-Mail DeskPro Middleware TargetProcessAPI Gateway

Create bug ticket

Close ticket

Create ticket Webhook

Event source Lambda

DeskPro -> TargetProcess (fully automated)

Page 10: AWS Lambda

1002.05.2023

Limits

Maximum execution duration per request => 300 seconds

Alternative S3 Storage

Lambda function deployment package size (.zip/.jar file) => 50 MB

100 concurrent executions1.000 invokes per second Increases available via AWS customer service

Page 11: AWS Lambda

1102.05.2023

Costs

1 million requests and 400,000 GB-second of compute time every month, every customer for free

$0.20 per 1 million requests ($0.0000002 per request)

Never pay for idle

Page 12: AWS Lambda

1202.05.2023

Demo

DEMOhttps://github.com/kj187/aws_terraform_templates

Page 13: AWS Lambda

1302.05.2023

Thank youAny Questions ?