AWS Hero &
Staff Engineer @Datadoghq &
Ex @goserverless &
Mr to @UArvindam &
AKA Aaron Stuyvenberg.
&&
Ask me about your cold starts
Mar 3, 2022 • 6 tweets • 2 min read
Which would you expect would be faster, SNS directly invoking a Lambda function? Or SNS to SQS to a Lambda function?
Here's a fun thread documenting what I've learned!
🧵👇 #Serverless
In a totally unscientific test (N=3), I’ve observed SNS messages delivered directly to Lambda functions are slower than an SNS message sent to SQS, then delivered to Lambda.
DynamoDB streams are GREAT! I use them in almost every place I use a DDB table with #Serverless. I suggest doing non-essential work via stream vs in one long function call, so the end user gets the fastest experience possible.
This is an important function, but users shouldn't have to wait for my API to call an email provider before getting a response from the backend. Stream it to another function!