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

Testing Terraform AWS Modules in Harness CI with LocalStack

LocalStack enables organizations to automate their application testing and integration process through DevOps practices, such as continuous integration (CI). LocalStack allows organizations to move away from complicated AWS testing and staging environments by enabling a key component of testing and delivering cloud-native applications.To further automate the process, we use Infrastructure-as-Code (IaC) frameworks like Terraform that allow you to create your resources declaratively and apply those resources. Testing your Terraform modules against the real AWS cloud can be time-consuming and costly and can make you run into the risk of dangling resources after an unsuccessful CI run. Using LocalStack to emulate a mock ephemeral AWS infrastructure on CI pipelines allows you to work on the same functionality the real AWS cloud provides while cutting down testing costs and deployment times.In this session, Jim Sheldon, Senior Developer Advocate at Harness, will demonstrate how to use LocalStack to test Terraform modules on Harness CI. Harness CI allows you to create software pipelines that will enable you to check out your code, build the software, run your tests, and validate every code change. We wind up the session with updates about the all-new LocalStack release!

Learn More
Learn More
Smarter Serverless Dev with LocalStack VS Code Toolkit & Lambda Debugging

In this hands-on session, you’ll learn how to level up your serverless development by integrating the AWS Toolkit for VS Code with LocalStack — enabling faster Lambda development, debugging, and testing without needing a live AWS account.👨‍💻 Featuring:Joel Scheuner, Senior Software Engineer at LocalStack, will show you how to:✅ Configure the AWS Toolkit for VS Code to connect with LocalStack✅ Deploy and test Lambda functions locally with full AWS emulation✅ Set breakpoints and debug functions right from your IDE✅ Iterate quickly on code changes with minimal setup overheadYou’ll also hear from an AWS engineer sharing real-world insights and best practices for modern serverless workflows.Whether you’re new to serverless or already deep in AWS development, this session will help you code with confidence and streamline your Lambda workflow from start to finish — all from your laptop.

Learn More
Learn More
Testing CloudWatch metric alarms with LocalStack

LocalStack is a cloud service emulator designed for local development and testing of cloud applications. With LocalStack, you can test AWS CloudWatch metric alarms, to get notified on infrastructure failures — all on your local machine!In this video, you will learn how you can use a CloudWatch metric alarm to get notified automatically when your Lambda function invocations fail. You will also set up an email notification using the Simple Email Service (SES) and our Mailhog extension.## Resources• CloudWatch Docs: https://docs.localstack.cloud/user-guide/aws/cloudwatch/• LocalStack Extensions: https://docs.localstack.cloud/user-guide/extensions/• Mailhog extension: https://pypi.org/project/localstack-extension-mailhog

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