Middy Environment Variable Middleware
JSON →middy-env is a middleware for the middy framework, specifically designed to parse and inject environment variables into AWS Lambda function handlers. It's currently at version 2.0.0, which aligns with the major version 2.x of the core middy framework, ensuring compatibility with the latest middy features and architecture. This package provides robust configuration management for serverless functions, allowing developers to define required environment variables, specify their expected types (string, int, float, bool), and provide fallback values to prevent runtime errors. A key differentiator is its ability to assign parsed variables directly to the Lambda `context` object by default, rather than polluting the global `process.env`, offering a cleaner and more isolated configuration scope per invocation. It also supports optional caching of parsed values to optimize performance for subsequent warm invocations, with configurable expiry times. The package maintains a stable release cadence, typically aligning with major middy framework updates.
Traffic · last 30 days ↓44% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇩🇪 Germany · 🇬🇧 United Kingdom