t2.medium 4GB
Standard RI, 3-year
All upfront: $458 / 4
Prices current as of 5/28/2018
Lambda (ignoring request charges):$0.00001667 for every GB-s of compute X 60 seconds/minute X 60 minutes/hour X 24 hour/day X 365 days/year X 3 years ==
$0.0225 per Application Load Balancer-hour (or partial hour)$0.008 per LCU-hour (or partial hour)
X 24 X 365 X 3
t2.medium 4GB
Standard RI, 3-year
All upfront: $458 / 4
Prices current as of 5/28/2018
Lambda (ignoring request charges):$0.00001667 for every GB-s of compute X 60 seconds/minute X 60 minutes/hour X 24 hour/day X 365 days/year X 3 years ==
0.00000040 to put, retrieve, and delete (3X) at 1 TPS X 60 X 60 X 24 X 365 X 3
t2.medium 4GB
Standard RI, 3-year
All upfront: $458 / 4
Prices current as of 5/28/2018
Lambda (ignoring request charges):$0.00001667 for every GB-s of compute X 60 seconds/minute X 60 minutes/hour X 24 hour/day X 365 days/year X 3 years ==
3.75 GB
$1013 for 3 year up front RI in US-East-1, / 3.75 = 270.13
+ ALB + SQS =
3.75 GB
$1013 for 3 year up front RI in US-East-1, / 3.75 = 270.13
+ ALB + SQS =
THIS IMAGE IS CC0:
You can use this free image under the Creative Commons Zero (CC0) public domain license.
https://www.dreamstime.com/green-sky-globe-grass-public-domain-image-free-114791480
AWS has a full portfolio of managed services.
They span many areas – from compute, like Lambda, to storage, like S3, to databases like DynamoDB, to IoT, messaging, and many more.
All these services have one thing in common: When you use them, you don’t have to worry about the infrastructure inside them. You just call their APIs.
They also have another thing in common: They are the pieces from which you construct modern-day (serverless) applications: Combining these different services lets you create powerful solutions.
Here’s another example: If you combine Lambda, S3, API Gateway, and DynamoDB, you get a serverless web site! Your static content goes into S3, Lambda and Dynamo handle the dynamic content, and API Gateway provides the HTTP endpoint. And then once you start getting more customers, it scales automatically for you!
The most important lesson here is: Don’t build things you don’t have to – just combine services that already exist to save time and avoid operations pain, and let AWS do the hard work while you take the credit!
For example: If you combine Lambda with Kinesis, you get a serverless analytics processing solution.
Using these services, you can quickly build a system for aggregating click-stream analytics or analyzing security logs.
It’s so fast to build, because much of the work is already done: The job of storing, streaming, and processing records is built in, so all you need to add is your code to tell Lambda what kind of analysis to perform on each record as it flows through.
There are many possible patterns – too many to describe each one, and more are being created all the time!
In fact, every managed AWS service can be combined with Lambda to make a pattern, as can many 3rd party services.
With so many services and options, how can we better understand these patterns?
Fortunately, you don’t have to memorize every possible pattern…all these patterns fall into a small number of categories, or “meta patterns”.
For example, services that send events to Lambda, such as S3 and SNS (#1 on the list): All of these are similar, in that when something changes, like an object being created in S3 or a message arriving in SNS, your Lambda function is triggered. This is the single most common meta-pattern, asynchronous events.
Another meta pattern is conversations (#3). This is the way that bots work: Each phrase in the conversation is transmitted synchronously to the Lambda function, with the state of the conversation so far passed in as an argument.
And these patterns even extend beyond the cloud: #9 is Lambda functions used inside devices, such as the DeepLense camera and other IoT devices, or Snowball Edge, where Lambda is used to customize files being uploaded or downloaded from an appliance.
If you understand these categories, then you can predict and understand virtually all of the patterns on the previous slide! You’ll be well prepared to create your own serverless solutions.