Streamline your AWS Lambda code when working with Node.js.
Middy simplifies Node.js Lambda function code, freeing you to focus on your core business logic, while effortlessly eliminating redundancy and extensive boilerplate code.
How does it work?
Middy empowers developers to incorporate common elements like authentication, authorisation, validation, and serialisation in a modular and reusable fashion. By decoupling these concerns from your primary code, Middy allows you to keep your attention squarely on your business logic, resulting in cleaner and more efficient serverless applications.
Benefits:
- Simple but powerful: Middleware engines enhance code organisation, eliminate duplication, and standardise the management of non-functional concerns such as authentication, authorisation, validation, and serialisation.
- Focus on the essentials: By offloading non-functional code to middleware, you can boost productivity and concentrate on what truly matters: the core business logic.
- Lean and efficient: Middy boasts a very small core and an unobtrusive API, ensuring it adds the least possible overhead to your code.
- Ready-made solutions: Middy includes an extensive collection of official middleware and utilities that are ready to use, tackling the most common non-functional use cases effortlessly.
- Exceptional speed: Middy has been meticulously crafted to optimise your Lambda functions for speed. Its streamlined core keeps Lambda sizes compact and cold starts under control. You can add only the components you require!
- Extensibility: Need more customisation? Crafting your own custom middleware is straightforward. Plus, if that’s not enough, you can even expand Middy’s capabilities through its hooks.
Supported in the AWS Lambda Powertools for Typescript.
AWS Lambda Powertools for TypeScript seamlessly integrates with Middy, reducing the manual setup required for many essential features.
Whether you’re coding in TypeScript or JavaScript, the utility instrumentation remains consistent. This compatibility ensures optimal performance of your serverless applications, regardless of your language preference.
AWS Bites Podcast
How can Middy make writing Lambda functions easier?
The Middy.js framework was designed to help you keep Node.js Lambda function
code simple, letting you focus on the business logic and clearing away duplication & boilerplate. Tune in to discover how Middy.js works with JavaScript and TypeScript, how to perform validation, event parsing and parameter loading, and how you can even write and use your own Middy middleware.
![](https://fourtheorem.com/wp-content/uploads/2024/05/Amazon_ECS_Delivery_badge-300x300.png)
![](https://fourtheorem.com/wp-content/uploads/2024/05/AWS_Advanced_Tier_Services_badge-300x300.png)
![](https://fourtheorem.com/wp-content/uploads/2024/05/AWS_Lambda_Delivery_badge-300x300.png)