Serverless Best Practices with AWS Lambda PowerTools

For one-off tasks, AWS Lambda really can be incredibly easy. You write a few lines of code, deploy it, and you have a function running in the cloud ready to respond to events, scale automatically, and that only costs you pennies. But as your application grows, so does some necessary complexity. When a few one-off functions become a full serverless backend architecture made up of interconnected services, you’ll need to pay careful attention to best practices to ensure that your application is easy to debug, maintain, and scale. That’s where AWS Powertools for Lambda fits in. It’s a suite of reusable utilities designed to simplify bringing best practices around things like logging, tracing, metrics, idempotency and more to your Lambda functions with minimal effort. This demo session will dive into some of the functionality provided by the AWS Powertools (TypeScript) core libraries, such as encapsulating best practices into reusable libraries for structured logging, metrics collection, idempotency, and more; leveraging Middy middleware to integrate common cross-cutting concerns, such as injecting Lambda context or automatically flushing metric; enabling local testing with LocalStack, allowing you to deploy and debug Lambda functions with structured logs, trace data, and embedded metrics; and providing modular examples that can be deployed to AWS or LocalStack with ease, enabling developers to explore libraries.

Related Talks

Replicating cloud resources locally with LocalStack's AWS Replicator extension

LocalStack's core cloud emulator lets you emulate various cloud services on your own computer. This means you can develop and test your cloud-based solutions without connecting to a remote cloud. However, there are times when you need to seamlessly switch between your local setup and actual cloud resources, especially in hybrid situations. For instance, you might want to share a database with your local Lambda function or access S3 files stored remotely while running a Glue ETL job locally. With LocalStack's AWS Replicator extension, your local environment can replicate AWS cloud resources at the API level, allowing direct interaction with cloud services. The Replicator extension enables you to forward specific requests from LocalStack to AWS without complex proxy setups, and create test scenarios that involve a mix of local and cloud resources.

Learn More
Learn More
OpenInfraQuote: Wrangling cloud costs with an open source, standalone, Terraform cost estimator

Cloud infrastructure has fueled innovation for nearly two decades—yet cost control remains a challenge. Unforeseen expenses and complicated billing can hamper agility, forcing teams to overspend just to stay competitive. What if you could evaluate costs in real-time, identify inefficiencies, and optimize deployments—without slowing development? Imagine adjusting parameters based on on-the-fly estimates and usage. In this presentation, Malcolm Matalka, Co-founder and CTO of Terrateam, explores how OpenInfraQuote, a new open-source command-line tool, transforms Terraform and OpenTofu code into actionable cost insights. Learn how to automate price checks, compare scenarios, and avoid financial surprises—alongside how it differs from other solutions and how to integrate it into your workflow.

Learn More
Learn More
Multi-account and multi-region in LocalStack

Multi-account and multi-region compatibility enables users to manage and deploy resources across multiple AWS accounts and geographic regions. This functionality enhances the robustness of the deployments by offering improved fault tolerance, scalability, and regulatory compliance. By segregating resources into separate accounts and distributing them across various regions, users can minimize the impact of potential failures and optimize performance. In this session from LocalStack Community Meetup May '24, Sannya Singhal discussed how you could use LocalStack to emulate multi-account and multi-region environments locally for testing and development purposes, ensuring that applications were resilient and scalable before deployment to the cloud.

Learn More
Learn More

Launch yourself in the world of local cloud development

Try for free
Try for free
Talk to Sales
Talk to Sales