🦀 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) to aws_config::load_defaults(BehaviorVersion::latest()) across all code examples

  • Fixed 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! 🍋

  1. Head over to Gumroad, log in, and open up your product library.

  2. You’ll see a list of all your purchased products—look for “Crafting Lambda Functions in Rust (e-book)”.

  3. 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!"

- Anonymous

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:

Deploying Lambda Functions in Rust EASY PEASY.pdf1.82 MB • PDF File

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

or to participate.