Feature request: Helper function for validating required environment variables #3159
Open
2 tasks done
Labels
feature-request
This item refers to a feature request for an existing or new utility
need-customer-feedback
Requires more customers feedback before making or revisiting a decision
Use case
It would be helpful to have a helper function to validate that required environment variables are present and not empty. This is a common use case when developing Lambda functions, and currently requires developers to write repetitive boilerplate code. This will improve error handling and make code more robust and maintainable.
Solution/User Experience
Create a helper function
getRequiredEnvVar
that:Example Usage
Benefits
Implementation Notes
@aws-lambda-powertools/commons
packageMissingEnvironmentVariableError
) for better error handlingAlternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: