- Crafting Lambda Functions In Rust (e-book)
- Posts
- đŚ 2 New chapters Published!
đŚ 2 New chapters Published!
Let's talk code organization and testing
If you are reading this is probably because you bought a copy of the e-book âCrafting Lambda Functions in Rustâ by Luciano Mammino and James Eastham: A practical guide on how to build efficient, sustainable, cost-effective serverless AWS solutions with the Rust programming language. If not, and this topic sounds interesting to you, check out the book website at rust-lambda.com.
Hello, wonderful friends of the crabby Lambda Functions! đŚ
Howâs life treating you?
The yearâs wrapping up, and you know what that means? Lots of projects to finish, goals to hit, and those infamous end-of-year reviews lurking around the corner! But hey, weâre not here to chat about our to-do lists. Weâve got some exciting news to brighten things up: the newest release of Crafting Lambda Functions in Rust is live! đ And weâve got not one, but two fresh chapters for you:
Chapter 5: Code Organisation
Chapter 6: Making the Code Testable
Weâve also tackled a bunch of typos and other little tweaks, thanks to your sharp eyes and feedback! Keep âem coming; every bit helps us make the book even better.
Alright, letâs dive into all the details!
đď¸ Whatâs new
Wait, are Single Purpose Lambda Functions better than a Lambdalith?! đ°
Hereâs a quick look at whatâs inside the two shiny new chaptersâjust a little teaser to get you curious! đ¤
Chapter 5 - Code Organisation:
Exploring Lambdaliths vs. Single-purpose Lambda functions (SPuLFs)
How to make the most of monorepos and Cargo workspaces
Setting up a structured workspace
Crafting a shared utility library
Breaking down the Lambdalith
Applying Infrastructure as Code and the Principle of Least Privilege
Ideas for improvements
Chapter 6 - Making the Code Testable:
Testing 101: getting started with serverless testing
Defining different test types: Unit, Integration, End-to-End, and more
Testing in the serverless realm
The testing hexagonâyes, itâs a real thing!
Ephemeral environments
Techniques for testing asynchronous systems
Navigating trade-offs and alternative testing strategies
Writing your first integration test
Setting up a deployment-ready test environment
Quick feedback loops for faster integration tests
Using unit tests to speed up development cycles
And here are some of the other fixes and tweaks weâve added along the way:
Updated
aws_config::load_from_env()
(deprecated) toaws_config::load_defaults(BehaviorVersion::latest())
across all code examplesFixed numerous typos (thank you, arthurmf and lc1408!)
Added handy reminders to build your code before deployment (thanks again, arthurmf!)
Linked to a comparison of API Gateway HTTP vs. REST, by request from arthurmf
Clarified warnings about using (and installing) Zig for cross-compilation (shoutout to zaghaghi!)
đŚ How to get the new release
If you already have a copy of Crafting Lambda Functions in Rust, grabbing the latest release is easy-peasy, lemon squeezy! đ
Head over to Gumroad, log in, and open up your product library.
Youâll see a list of all your purchased productsâlook for âCrafting Lambda Functions in Rust (e-book)â.
Click on it, and voilĂ ! Youâll find all the updated download links right there.
All updated code examples are also available in our code repository, so you can dive into the latest examples straight away.
If you hit any snags along the way, reach outâweâre here to help!
đ We want to hear your feedback
Your thoughts mean the world to us. Whether itâs a suggestion, a favorite section, or something you found unclear, weâd love to know. Connect with us on Discord or via email and let us know how the bookâs been treating you!
And, if youâre feeling extra generous, please consider leaving a review on Gumroad. Every review helps us grow and reach more readers. We just received our first review from an anonymous fan, and it made our day! But they say thereâs no such thing as too many reviews, so if youâve got a spare 3 minutes, a few lines on Gumroad would be amazing. Weâll even feature some of them on our website soon!
"I'm guilty of not having used Rust anywhere serious yet, so my knowledge is close to zero. Nevertheless, I was still able to follow because Luciano and James do a fantastic job of explaining. You'll learn why Rust is a great fit for serverless applications, and they cover everything from setting up your environment to optimizing for performance and cost. If you're looking to expand your skills in serverless architecture and want to see why Rust is maybe the way to go, this book is definitely worth checking out!"
Thank you, dear Anonymous! đť
đ Letâs show some love David and Cargo Lambda
Before we wrap up, letâs give a shoutout to David Calavera! You may remember him from a previous newsletter. David is one of our amazing technical reviewers and the author of the foreword in our book. But beyond that, heâs the mastermind behind Cargo Lambda, the tool that makes Rust Lambda functions a breeze.
David is currently looking for sponsors to help keep Cargo Lambda alive and thriving. Weâre pitching in to support him, and if youâre a fan of honest-to-goodness open-source work, consider joining us by sponsoring David on GitHub. It doesnât have to be a big contribution; every bit helps! And if sponsorship isnât possible for you right now, you can still lend a hand by sharing one of Davidâs posts. Getting the word out is a huge help, too!
Thanks for supporting awesome open-source work, you rock! đ¤
đŽ Whatâs next
Thereâs still plenty more to cover in the book! After a well-deserved break, weâll be diving back in, pouring our hearts and minds into the next chapters. No spoilers this timeâbut if youâve been following along, you might have a good idea of whatâs coming next!
Stay tuned for the next release, and in the meantime, if you have any thoughts or suggestions, donât be a stranger!
Until next time,
â Luciano & James
đ PS: A little gift for you
Wow, you made it to the end of this email! You deserve a reward! đ Itâs a small one, but we think youâll find it useful. Luciano recently shared a short PDF on social media showing how to deploy your first Lambda function in 5 simple steps. Sounds like clickbait, right? But after sharing it around, weâve heard such great feedbackâit seems to be the perfect way to show that getting started with Lambda Functions in Rust isnât as daunting as it might seem.
Many people think itâs complicated to launch Lambda Functions in Rust, but once you know Cargo Lambda, youâll see just how simple it is to get something running in production.
If youâre looking to convince friends and colleagues or just want a quick refresher on scaffolding, testing, building, and deploying a Lambda function in Rust, grab our quick guide below:
|
And, one last thing⌠Luciano is hosting a full-day workshop on building Lambda functions in Rust at Serverless Days Rome on December 12th! If a holiday trip to Rome before Christmas sounds tempting (trust us, itâs a magical time of year), consider joining. Luciano would love to see you there!
Ciao!
Reply