Profile picture
Tom Leaman @tleam
, 19 tweets, 10 min read Read on Twitter
Next up: Optimizing Your Serverless Applications with @chrismunns. Looking forward for tips on improving perf but more importantly I hope we cover how to best track serverless “service levels” over time
We are getting started with the Serverless Optimization talk. Every seat is filled. #reInvent
While it’s a 400 level session, always helps to give an appropriate high level review to set context. We are talking Lambda today #reInvent
Incase you missed it: Firecracker is available now. It’s the foundation for Lambda’s compute substrate.
3 other levels of Lambda anatomy. Two levers to impact performance: execution environment and function logic #reInvent
Reminder: Lambdas are ephemeral. No state. Prefer lazy loading and don’t load if you don’t need it to prevent impact to cold starts. #reInvent
Like most architectures, global variables can be tough. If you’re utilizing global with Lambdas that initialize at start you’ll be resetting the global *every* *time* a lambda starts.
Try using Parameter Store for configuration data for Lambdas - can be secured with IAM and audited via CloudTrail. Awesome for centralized variables and flags. Ideally interact with these in a pre-handler.
Best practices for Lambda function logic. Opinion: general jist I’m getting is to be purposeful and appropriate in service use and data access. Ideally a good pattern in both Serverless and Traditional compute.
@chrismunns - “Keep orchestration out of the function logic. It adds up over time costing you both money and reliability. Move it to step functions”
And here’s another good visual on divvied up responsibility for Lambda performance between AWS and users #reInvent
To improve performance of your Lambdas you *need* to measure it. Utilizing a trace service like XRay provides that flexibility.
There’s a direct correlation for Lambda performance and memory allocation. Default allocation is 128MB. “First question I ask to folks struggling with Lambda performance is: have you adjusted the memory?” @chrismunns #reInvent
Concurrency can be a powerful tool with Lambdas but must be done appropriately and in a controlled manner. Certain models can DDoS downstream services if left unchecked. Make sure to utilize scaling & concurrency controls #reInvent
Lots of detail on Failure and Retry specifics based on lambda invocation models. One key takeaway: enable dead letter queues for async use cases #reInvent
Simple decision flow for whether you should run your Lambdas in a VPC or not #reInvent
Reminder: once a lambda is run in a VPC it’s your responsibility to make it HA. You don’t get it out of the box like you would outside the VPC. #reInvent
“Don’t make puppies sad. Don’t use asterisks for security controls” - @chrismunns
@threadreaderapp unroll thanks
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Tom Leaman
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!