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.Providing modular examples that can be deployed to AWS or LocalStack with ease, enabling developers to explore libraries.

Related Talks

Saving & Sharing Your LocalStack State with CloudPods

Tired of rebuilding your stack from scratch every time you run tests or restart your dev environment? In this episode, we dive into Cloud Pods, LocalStack’s powerful state management feature.You’ll learn how to:- Snapshot your entire LocalStack environment (services, resources, data)- Restore that exact state across machines, teams, or CI runs- Speed up test cycles and workflows- Use Cloud Pods to make testing in CI/CD faster and more reliableCloud Pods let you freeze your infrastructure in time. Perfect for repeatable tests, isolated dev environments, or onboarding new teammates.🔗 Read the companion blog post: https://blog.localstack.cloud/save-and-share-localstack-state-with-cloudpods/

Learn More
Learn More
Running dbt workflows locally with LocalStack

dbt (Data Build Tool) helps data engineers manage data transformations using modular SQL and brings version control, testing, and documentation to their transformation logic. However, running dbt against production data warehouses like Snowflake can be slow, expensive, and risky.This session introduces a new way to develop and test dbt workflows locally using the Snowflake emulator in LocalStack. You'll learn how to: Set up a local dbt environment Configure dbt to connect to the Snowflake emulator Run and validate dbt models locally without using a real Snowflake account Iterate quickly on transformations before pushing them to productionThrough a hands-on factory app example, we’ll walk through how to use the Snowflake emulator to run dbt models on your laptop, helping you test logic, catch issues early, and reduce cloud costs.

Learn More
Learn More
Running an EC2 instance locally using LocalStack

In this video, you'll learn how you can run an Elastic Compute Cloud (EC2) instance locally using LocalStack's core cloud emulator. Elastic Compute Cloud (EC2) is a core service within Amazon Web Services (AWS) that provides scalable and flexible virtual computing resources. EC2 enables users to launch and manage virtual servers, commonly referred to as instances. LocalStack is a core cloud emulator that allows you run EC2 instances using a Docker backend. Under the hood, LocalStack spins another Docker container that mimics an EC2 instance functionality, including other add-on features such as EBS, IMDS, and Load Balancers.For more information, check out our docs:- Install LocalStack: https://docs.localstack.cloud/getting-started/installation/- Configure an Auth Token: https://docs.localstack.cloud/getting-started/auth-token/ - Supported EC2 operations: https://docs.localstack.cloud/user-guide/aws/ec2/#operations - Supported Instances & AMIs: https://docs.localstack.cloud/user-guide/aws/ec2/#instances-and-amis Corrections:- LocalStack will no longer provide the Ubuntu 20.04 Docker AMI (used in this video) by default in the next major release. It can still be manually added.- On nine minutes & nine seconds mark, we meant 'localhost' instead of 'localstack'. To access the web server, you can hit the localhost:8000 endpoint as shown in the video.

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