SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Who Am I ?
By day:
Technical Program Manager
• National Rural Electric Cooperative Association
• Large 40M+ Angular, Backbone.JS, .Net WebApi
• application
By night
JavaScript Extraordinaire
Co-Founder & Chief Engineer for Hoozip.com
• Angular
• AWS S3
• AWS Lambda
• AWS Api Gateway
• AWS EC2
@javascriptbully
• Mongo
• Express
• Angular
• NodeJS
• AWS
• NodeJS
• Angular
• Lambda
@javascriptbully
“Time to get Mean!”
?
Who Am I ?
Time to get
A.N.A.L !!!!!
Event-Driven Compute
• As data enters your cloud infrastructure Lambda makes it extremely easy to
transform that data by applying your function to the data based on events you
define.
• Examples include data transformation, image transformation, large scale data
analysis. For example, run transformation functions whenever a DynamoDB
table is loaded.
• Ability to scale horizontally across large scale work loads and dynamically then
instantly shrink back once the work is complete.
• 100 concurrent executions
• 1,000 invokes per second
Quickly build mobile Backends
• AWS mobile SDKs
Lambda offering overview
• Runs code in response to events
• Object uploads to Amazon S3
• Updates to Amazon DynamoDB via Streams
• Data in Amazon Kinesis Streams
• In app activity
• Lambda handles all capacity, scaling, patching and infrastructure administration
• Lambda only runs your code when triggered so you don’t have to pay for unused capacity
• Provides realtime metrics and logs to Amazon CloudWatch
• Low cost, No upfront costs
• Code is charged in measurements of 100ms increments
• Python, Java, NodeJs
• Lambda Function (Micro service architecture)
• Prebuilt examples
• Built in support for AWS SDK
• AWS Free Tier you can try Lambda for free
• Security is baked in
Lambda offering overview (cont’d)
AWS Lambda supports the following runtime versions
• Node.js: v0.10.36
• Java: Java 8
• Python: Python 2.7
If you author your Lambda function code in Node.js,
the following libraries are available in the AWS Lambda
execution environment so you don't need to include
them:
• ImageMagick: Installed with default settings. For
versioning information, see imagemagick nodejs
wrapper and ImageMagick native binary
(search for "ImageMagick").
• AWS SDK: AWS SDK for JavaScript version
2.2.32
If you author your Lambda function code in Python, the
following libraries are available in the AWS Lambda
execution environment so you don't need to include
them:
• AWS SDK for Python (Boto 3) version 1.2.3
There are no additional libraries available for Java.
Hoozip Use Case
• Want to send property reports on demand via SMS
• Wanted to follow an event driven, micro service design
• Scale our systems up or down when certain load metrics are hit
• Send out notifications to owners of properties when their property is requested
• Managing and reacting to all those events would require a complex infrastructure, so
often we simply put them together in one controller action or use observers that run in
the same processes as our applications. This makes the codebase more complex as
parts start getting interwoven.
• Most teams start pushing those tasks into background workers, but the infrastructure
necessary for managing tasks this way is overhead too. Therefore, background
workers are typically limited to the most important tasks. This is especially true when
they don’t get automatically triggered by events, but need to be triggered through the
codebase. Doing this adds another level of complexity to the code in order to
understand which part triggers which event.
• It lets you write small NodeJS functions that will be called with the event metadata
from events triggered by various services or through your own code.
Hoozip
• Hoozip.com is a marketplace and software provider for real estate investors
(rehabbers, wholesalers, lenders) to find, post, and curate real estate
investment deals in an efficient way.
What we normally would do
• Size Provision Scale Servers
• Estimate capacity
• Run fault tolerance
• Manage Operating System
Updates
• Apply Security Patches
• Monitor for performance and
availability
• Lambda does the
impedance matching for
your event flow so you don’t
have to worry about over or
under provisioning as
Lambda scales elastically
call twilio
post to ApiGateway
call Lambda
parse message
fuzzy address
geoCode address
call property API
call bitly API
persist to DynamoDB
generate message
post back to twiliosend message
How we did it…
* As the API get’s busier, we’ll add a queueing / push
notification mechanism via SQS & SNS
TEXT YOUR DEAL
ADDRESS
TO HOOZIP!
(202) 798-1333
Hoozip Architecture
• We serve our Angular app out of a S3 Bucket
• We use CloudFront as our CDN for all static assets including
the Angular App
• Most of our services are separate stand alone projects and
handled via Api Gateway and Lambda
• We currently use DynamoDB for persisting and Postgres as
our store for financial related actions and some GeoSpatial
calculations.
• When we can’t use Lambda (static IP addressing,
computationally heavy work loads) we use EC2 with Node
v4.0, Express, served via Node Forever and NodeMon
LET’S CODE!!!!
enough of that
What’s available while programming in Node?
• Lambda Function Handler
• Event Object
• Context Object
• ImageMagick available (Node.js)
• Logging & Monitoring (CloudWatch & CloudTrail)
• Exceptions
• Ephemeral I/O operations while function is executing
• Awesome! But the worst part:
• Node v0.10.36
• http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
Code via the online code editor, or in your own IDE
• Let’s build a simple API that goes out to Github, and get’s a user object.
• Here’s our Lambda function:
Testing your Lambda function locally
• Easy to test your logic locally
• Easy to turn this into an express module that you can then use
to serve via an api somewhere else so you’re not bound to
Lambda if you decide to move at a later date.
Upload your code
• Compress the items in you source
folder.
• Upload the zip file directly to your
Lamda function via the console.
• Better if you use a task manager like
Gulp that will zip the file and upload it
for you via the AWS SDK publish API
• I prefer to use Gulp to zip my code, then
upload to S3 so I have artifact
versioning as well. I wrote another
Lambda functions that listens for upload
events on that bucket then imports the
code into my Lambda function.
Now let’s create an API in API Gateway
that integrates with our Lambda Function
Let’s setup our API to have a query string parameter
called ‘name’ that we pass into our Lambda Function
Next we map the data retrieved byApi Gateway
to the Event object passed into our Lambda Function
via the mapping template
Let’s deploy our Api to a stage called ‘prod’!
Staging allows you to create various versions of your
Api for testing, different clients, etc…
And we’re done!
Instantly scalable to millions of users!
Here’s my Lambda function that
deploys other Lambda Functions
• Event source for this Lambda function in my S3 bucket where I upload my
Lambda zip files
• Uses the AWS SDK which is already loaded into memory by AWS.
Pricing Details
• No hourly, daily, monthly minimums
• No per device fees
• Compute time is purchased in 100ms increments
• 1M requests and 400,000 GB-s of compute every month for free
• You only pay when you’re doing work, not when you’re idle.
Requests
You are charged for the total number of requests across all your functions. Lambda counts a request
each time it starts executing in response to an event notification or invoke call, including test invokes
from the console.
• First 1 million requests per month are free
• $0.20 per 1 million requests thereafter ($0.0000002 per request)
Duration
Duration is calculated from the time your code begins executing until it returns or otherwise terminates,
rounded up to the nearest 100ms. The price depends on the amount of memory you allocate to your
function. You are charged $0.00001667 for every GB-second used.
Free Tier
The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time
per month. The memory size you choose for your Lambda functions determines how long they can run in
the free tier. The Lambda free tier does not automatically expire at the end of your 12 month AWS Free
Tier term, but is available to both existing and new AWS customers indefinitely.
Monthly compute charges
The monthly compute price is $0.00001667 per
GB-s and the free tier provides 400,000 GB-s.
Total compute (seconds) = 30M * (0.2sec) =
6,000,000 seconds
Total compute (GB-s) = 6,000,000 * 128MB/1024
= 750,000 GB-s
Total Compute – Free tier compute = Monthly
billable compute seconds
750,000 GB-s – 400,000 free tier GB-s = 350,000
GB-s
Monthly compute charges = 350,000 *
$0.00001667 = $5.83
Monthly request charges
The monthly request price is $0.20
per 1 million requests and the free
tier provides 1M requests per month.
Total requests – Free tier request =
Monthly billable requests
30M requests – 1M free tier requests
= 29M Monthly billable requests
Monthly request charges = 29M *
$0.2/M = $5.80
Total compute charges
Total charges = Compute charges
+ Request charges = $5.83 + $5.80
= $11.63 per month
Pricing Example
If you allocated 128MB of memory to your function, executed it 30 million times in one month,
and it ran for 200ms each time, your charges would be calculated as follows:
What should you do next?
• Take just one API and turn it into a Lambda function.
• Build a mobile app using the Mobile SDK using Lambda as
your backend
• Great example of scaling a total of 57 lines of code including error handling to
16 million posts a day.
• Scrub to 26:00 to see the Zillow presentation
https://www.youtube.com/watch?v=ygHGPnAd0Uo
Zillow Use Case (cont’d)
Zillow Use Case (cont’d)
Zillow Use Case (cont’d)
Calling Lambda Functions (extra)
Call from mobile or web apps
- Wait for a response or send an event and continue
- AWS SDK, AWS Mobile, Rest API, CLI
Send events from S3, or SNS
- One event per Lambda invocation, 3 attempts
Process DynamoDB changes records as events:
- Ordered model with multiple records per event
- Unlimited retries (until data expires) or determined by your code
Writing Lambda Functions (extra)
• AWS SDK by default
• Imagemagick for NodeJS Lambdas
• Lambda handles the inbound traffic (no web server)
• Scheduled Functions! (uses cron syntax)
• Allows versioning via a publish API so you can create immutable contracts with your
clients, and you can version via S3
• (Versioning happens via the ARN format FunctionName:ARN or FunctionName:
$LATEST)
• You can alias the ARN, allows for each rollbacks by quickly associating an alias with a
different ARN. You can also version via the API in API Gateway by assigning the
resource to a different Lambda Function.
Stateless
• Use s3, DynamoDB, or any internet based storage to persist data.
• Call other API’s from your Lambda function, or other Lambdas.
• Uses processes, threads, sockets, i/o for file writing (ephemeral) etc…
• You can add your own libraries, no restrictions
Send events from S3, or SNS
- One event per Lambda invocation, 3 attempts
Process DynamoDB changes records as events:
- Ordered model with multiple records per event
- Unlimited retries (until data expires) or determined by your code

Weitere ähnliche Inhalte

Was ist angesagt?

AWS Lambda: Event-Driven Code in the Cloud
AWS Lambda: Event-Driven Code in the CloudAWS Lambda: Event-Driven Code in the Cloud
AWS Lambda: Event-Driven Code in the CloudAmazon Web Services
 
(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data WorkloadsAmazon Web Services
 
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Skillenza Build with Serverless Challenge -  Advanced Serverless ConceptsSkillenza Build with Serverless Challenge -  Advanced Serverless Concepts
Skillenza Build with Serverless Challenge - Advanced Serverless ConceptsDhaval Nagar
 
Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017
Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017
Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017Amazon Web Services
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaAmazon Web Services
 
A Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaA Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
AWS Lambda and the Serverless Cloud -Pop-up Loft
AWS Lambda and the Serverless Cloud -Pop-up LoftAWS Lambda and the Serverless Cloud -Pop-up Loft
AWS Lambda and the Serverless Cloud -Pop-up LoftAmazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Serverless presentation
Serverless presentationServerless presentation
Serverless presentationjasonsich
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...Luciano Mammino
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the TrenchesYan Cui
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAmazon Web Services
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesAmazon Web Services
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Apigee | Google Cloud
 
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...Mark West
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaAmazon Web Services
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless ArchitecturesAmazon Web Services
 
State of serverless
State of serverlessState of serverless
State of serverlessAnurag Saran
 

Was ist angesagt? (20)

AWS Lambda: Event-Driven Code in the Cloud
AWS Lambda: Event-Driven Code in the CloudAWS Lambda: Event-Driven Code in the Cloud
AWS Lambda: Event-Driven Code in the Cloud
 
(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads
 
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Skillenza Build with Serverless Challenge -  Advanced Serverless ConceptsSkillenza Build with Serverless Challenge -  Advanced Serverless Concepts
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
 
Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017
Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017
Real Time Data Processing Using AWS Lambda - DevDay Los Angeles 2017
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
A Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS LambdaA Walk in the Cloud with AWS Lambda
A Walk in the Cloud with AWS Lambda
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
AWS Lambda and the Serverless Cloud -Pop-up Loft
AWS Lambda and the Serverless Cloud -Pop-up LoftAWS Lambda and the Serverless Cloud -Pop-up Loft
AWS Lambda and the Serverless Cloud -Pop-up Loft
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Serverless presentation
Serverless presentationServerless presentation
Serverless presentation
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Serverless for Developers
Serverless for DevelopersServerless for Developers
Serverless for Developers
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 
Increase Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web ServicesIncrease Speed and Agility with Amazon Web Services
Increase Speed and Agility with Amazon Web Services
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
 
Real-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS LambdaReal-time Data Processing Using AWS Lambda
Real-time Data Processing Using AWS Lambda
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
 
State of serverless
State of serverlessState of serverless
State of serverless
 

Ähnlich wie AWS Lambda Presentation (Tech Talk DC)

Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless CloudAWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Amazon Web Services
 
Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2kartraj
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...Amazon Web Services
 
Getting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudGetting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudIan Massingham
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshopRory Preddy
 
Serverless Meetup - Event Sourcing
Serverless Meetup - Event SourcingServerless Meetup - Event Sourcing
Serverless Meetup - Event SourcingLuca Bianchi
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java DeveloperRory Preddy
 
NEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeNEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeAmazon Web Services
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWSSmartWave
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理Amazon Web Services
 
Serverless architectures on aws
Serverless architectures on awsServerless architectures on aws
Serverless architectures on awsPaolo latella
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaSerhat Can
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Amazon Web Services
 
AWS and Serverless with Alexa
AWS and Serverless with AlexaAWS and Serverless with Alexa
AWS and Serverless with AlexaRory Preddy
 
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Amazon Web Services
 

Ähnlich wie AWS Lambda Presentation (Tech Talk DC) (20)

Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless CloudAWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
 
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
 
Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2Serverlessusecase workshop feb3_v2
Serverlessusecase workshop feb3_v2
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
AWS March 2016 Webinar Series - AWS IoT Real Time Stream Processing with AWS ...
 
Getting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudGetting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless Cloud
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshop
 
Serverless Meetup - Event Sourcing
Serverless Meetup - Event SourcingServerless Meetup - Event Sourcing
Serverless Meetup - Event Sourcing
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
 
NEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeNEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the Edge
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS
 
使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理使用 AWS 無伺服器運算服務打造您的第一個語音助理
使用 AWS 無伺服器運算服務打造您的第一個語音助理
 
Serverless architectures on aws
Serverless architectures on awsServerless architectures on aws
Serverless architectures on aws
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS Lambda
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
 
AWS and Serverless with Alexa
AWS and Serverless with AlexaAWS and Serverless with Alexa
AWS and Serverless with Alexa
 
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
Zombie Apocalypse Workshop by Warren Santer and Kyle Somers, Solutions Archit...
 

Kürzlich hochgeladen

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

AWS Lambda Presentation (Tech Talk DC)

  • 1. Who Am I ? By day: Technical Program Manager • National Rural Electric Cooperative Association • Large 40M+ Angular, Backbone.JS, .Net WebApi • application By night JavaScript Extraordinaire Co-Founder & Chief Engineer for Hoozip.com • Angular • AWS S3 • AWS Lambda • AWS Api Gateway • AWS EC2 @javascriptbully
  • 2. • Mongo • Express • Angular • NodeJS • AWS • NodeJS • Angular • Lambda @javascriptbully “Time to get Mean!” ? Who Am I ?
  • 4. Event-Driven Compute • As data enters your cloud infrastructure Lambda makes it extremely easy to transform that data by applying your function to the data based on events you define. • Examples include data transformation, image transformation, large scale data analysis. For example, run transformation functions whenever a DynamoDB table is loaded. • Ability to scale horizontally across large scale work loads and dynamically then instantly shrink back once the work is complete. • 100 concurrent executions • 1,000 invokes per second Quickly build mobile Backends • AWS mobile SDKs
  • 5. Lambda offering overview • Runs code in response to events • Object uploads to Amazon S3 • Updates to Amazon DynamoDB via Streams • Data in Amazon Kinesis Streams • In app activity • Lambda handles all capacity, scaling, patching and infrastructure administration • Lambda only runs your code when triggered so you don’t have to pay for unused capacity • Provides realtime metrics and logs to Amazon CloudWatch • Low cost, No upfront costs • Code is charged in measurements of 100ms increments • Python, Java, NodeJs • Lambda Function (Micro service architecture) • Prebuilt examples • Built in support for AWS SDK • AWS Free Tier you can try Lambda for free • Security is baked in
  • 6. Lambda offering overview (cont’d) AWS Lambda supports the following runtime versions • Node.js: v0.10.36 • Java: Java 8 • Python: Python 2.7 If you author your Lambda function code in Node.js, the following libraries are available in the AWS Lambda execution environment so you don't need to include them: • ImageMagick: Installed with default settings. For versioning information, see imagemagick nodejs wrapper and ImageMagick native binary (search for "ImageMagick"). • AWS SDK: AWS SDK for JavaScript version 2.2.32 If you author your Lambda function code in Python, the following libraries are available in the AWS Lambda execution environment so you don't need to include them: • AWS SDK for Python (Boto 3) version 1.2.3 There are no additional libraries available for Java.
  • 7. Hoozip Use Case • Want to send property reports on demand via SMS • Wanted to follow an event driven, micro service design • Scale our systems up or down when certain load metrics are hit • Send out notifications to owners of properties when their property is requested • Managing and reacting to all those events would require a complex infrastructure, so often we simply put them together in one controller action or use observers that run in the same processes as our applications. This makes the codebase more complex as parts start getting interwoven. • Most teams start pushing those tasks into background workers, but the infrastructure necessary for managing tasks this way is overhead too. Therefore, background workers are typically limited to the most important tasks. This is especially true when they don’t get automatically triggered by events, but need to be triggered through the codebase. Doing this adds another level of complexity to the code in order to understand which part triggers which event. • It lets you write small NodeJS functions that will be called with the event metadata from events triggered by various services or through your own code.
  • 8. Hoozip • Hoozip.com is a marketplace and software provider for real estate investors (rehabbers, wholesalers, lenders) to find, post, and curate real estate investment deals in an efficient way.
  • 9. What we normally would do • Size Provision Scale Servers • Estimate capacity • Run fault tolerance • Manage Operating System Updates • Apply Security Patches • Monitor for performance and availability • Lambda does the impedance matching for your event flow so you don’t have to worry about over or under provisioning as Lambda scales elastically
  • 10. call twilio post to ApiGateway call Lambda parse message fuzzy address geoCode address call property API call bitly API persist to DynamoDB generate message post back to twiliosend message How we did it… * As the API get’s busier, we’ll add a queueing / push notification mechanism via SQS & SNS
  • 11. TEXT YOUR DEAL ADDRESS TO HOOZIP! (202) 798-1333
  • 12. Hoozip Architecture • We serve our Angular app out of a S3 Bucket • We use CloudFront as our CDN for all static assets including the Angular App • Most of our services are separate stand alone projects and handled via Api Gateway and Lambda • We currently use DynamoDB for persisting and Postgres as our store for financial related actions and some GeoSpatial calculations. • When we can’t use Lambda (static IP addressing, computationally heavy work loads) we use EC2 with Node v4.0, Express, served via Node Forever and NodeMon
  • 14. What’s available while programming in Node? • Lambda Function Handler • Event Object • Context Object • ImageMagick available (Node.js) • Logging & Monitoring (CloudWatch & CloudTrail) • Exceptions • Ephemeral I/O operations while function is executing • Awesome! But the worst part: • Node v0.10.36 • http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
  • 15. Code via the online code editor, or in your own IDE • Let’s build a simple API that goes out to Github, and get’s a user object. • Here’s our Lambda function:
  • 16. Testing your Lambda function locally • Easy to test your logic locally • Easy to turn this into an express module that you can then use to serve via an api somewhere else so you’re not bound to Lambda if you decide to move at a later date.
  • 17. Upload your code • Compress the items in you source folder. • Upload the zip file directly to your Lamda function via the console. • Better if you use a task manager like Gulp that will zip the file and upload it for you via the AWS SDK publish API • I prefer to use Gulp to zip my code, then upload to S3 so I have artifact versioning as well. I wrote another Lambda functions that listens for upload events on that bucket then imports the code into my Lambda function.
  • 18. Now let’s create an API in API Gateway that integrates with our Lambda Function
  • 19. Let’s setup our API to have a query string parameter called ‘name’ that we pass into our Lambda Function
  • 20. Next we map the data retrieved byApi Gateway to the Event object passed into our Lambda Function via the mapping template
  • 21. Let’s deploy our Api to a stage called ‘prod’! Staging allows you to create various versions of your Api for testing, different clients, etc…
  • 22. And we’re done! Instantly scalable to millions of users!
  • 23. Here’s my Lambda function that deploys other Lambda Functions • Event source for this Lambda function in my S3 bucket where I upload my Lambda zip files • Uses the AWS SDK which is already loaded into memory by AWS.
  • 24. Pricing Details • No hourly, daily, monthly minimums • No per device fees • Compute time is purchased in 100ms increments • 1M requests and 400,000 GB-s of compute every month for free • You only pay when you’re doing work, not when you’re idle. Requests You are charged for the total number of requests across all your functions. Lambda counts a request each time it starts executing in response to an event notification or invoke call, including test invokes from the console. • First 1 million requests per month are free • $0.20 per 1 million requests thereafter ($0.0000002 per request) Duration Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 100ms. The price depends on the amount of memory you allocate to your function. You are charged $0.00001667 for every GB-second used. Free Tier The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month. The memory size you choose for your Lambda functions determines how long they can run in the free tier. The Lambda free tier does not automatically expire at the end of your 12 month AWS Free Tier term, but is available to both existing and new AWS customers indefinitely.
  • 25. Monthly compute charges The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s. Total compute (seconds) = 30M * (0.2sec) = 6,000,000 seconds Total compute (GB-s) = 6,000,000 * 128MB/1024 = 750,000 GB-s Total Compute – Free tier compute = Monthly billable compute seconds 750,000 GB-s – 400,000 free tier GB-s = 350,000 GB-s Monthly compute charges = 350,000 * $0.00001667 = $5.83 Monthly request charges The monthly request price is $0.20 per 1 million requests and the free tier provides 1M requests per month. Total requests – Free tier request = Monthly billable requests 30M requests – 1M free tier requests = 29M Monthly billable requests Monthly request charges = 29M * $0.2/M = $5.80 Total compute charges Total charges = Compute charges + Request charges = $5.83 + $5.80 = $11.63 per month Pricing Example If you allocated 128MB of memory to your function, executed it 30 million times in one month, and it ran for 200ms each time, your charges would be calculated as follows:
  • 26. What should you do next? • Take just one API and turn it into a Lambda function. • Build a mobile app using the Mobile SDK using Lambda as your backend
  • 27.
  • 28. • Great example of scaling a total of 57 lines of code including error handling to 16 million posts a day. • Scrub to 26:00 to see the Zillow presentation https://www.youtube.com/watch?v=ygHGPnAd0Uo
  • 29. Zillow Use Case (cont’d)
  • 30. Zillow Use Case (cont’d)
  • 31. Zillow Use Case (cont’d)
  • 32. Calling Lambda Functions (extra) Call from mobile or web apps - Wait for a response or send an event and continue - AWS SDK, AWS Mobile, Rest API, CLI Send events from S3, or SNS - One event per Lambda invocation, 3 attempts Process DynamoDB changes records as events: - Ordered model with multiple records per event - Unlimited retries (until data expires) or determined by your code
  • 33. Writing Lambda Functions (extra) • AWS SDK by default • Imagemagick for NodeJS Lambdas • Lambda handles the inbound traffic (no web server) • Scheduled Functions! (uses cron syntax) • Allows versioning via a publish API so you can create immutable contracts with your clients, and you can version via S3 • (Versioning happens via the ARN format FunctionName:ARN or FunctionName: $LATEST) • You can alias the ARN, allows for each rollbacks by quickly associating an alias with a different ARN. You can also version via the API in API Gateway by assigning the resource to a different Lambda Function. Stateless • Use s3, DynamoDB, or any internet based storage to persist data. • Call other API’s from your Lambda function, or other Lambdas. • Uses processes, threads, sockets, i/o for file writing (ephemeral) etc… • You can add your own libraries, no restrictions Send events from S3, or SNS - One event per Lambda invocation, 3 attempts Process DynamoDB changes records as events: - Ordered model with multiple records per event - Unlimited retries (until data expires) or determined by your code