You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Flags utility for TypeScript - Bringing feature management to Powertools! 🚀
Hey folks! 👋
I'm a huge fan of the Powertools project and have been exploring all three implementations (TypeScript, Python, and Java). The libraries are fantastic and I'd love to contribute! While diving into the different versions, I noticed something really cool that we're missing in TypeScript - the Feature Flags utility.
The Python implementation is pretty slick
The Python version has this awesome Feature Flags utility that provides a simple rule engine to evaluate when features should be enabled. It's super handy for:
Progressive rollouts
A/B testing
Kill switches for problematic features
User-specific feature enablement
What would this look like in TypeScript?
I'm imagining something like:
import{FeatureFlags}from'@aws-lambda-powertools/feature-flags';import{AppConfigProvider}from'@aws-lambda-powertools/feature-flags/providers';constfeatureFlags=newFeatureFlags({provider: newAppConfigProvider({environment: 'dev',application: 'my-app',name: 'feature-flags'})});exportconsthandler=async(event: APIGatewayProxyEvent)=>{constuserId=event.requestContext.authorizer?.claims?.sub;// Check if new checkout flow is enabled for this userconstuseNewCheckout=awaitfeatureFlags.evaluate({name: 'new_checkout_flow',context: { userId,region: process.env.AWS_REGION},default: false});if(useNewCheckout){// New hotness 🔥returnhandleNewCheckoutFlow(event);}// Old reliablereturnhandleLegacyCheckout(event);};
Why this would be awesome
Consistency across Powertools languages - Teams using multiple Lambda runtimes could have the same feature flag patterns
Built-in best practices - Like other Powertools utilities, it would come with sensible defaults and caching
Native TypeScript experience - Full type safety, great IDE support
Integration with AWS services - AppConfig, Parameter Store, or even custom providers
Current workarounds
Right now, TypeScript users have to either:
Roll their own feature flag solution (reinventing the wheel)
Use third-party libraries (another dependency to manage)
Use AppConfig directly (more boilerplate, no built-in rule engine)
Questions for the community
Is anyone else interested in this feature?
What providers would you want to see first? (AppConfig, Parameter Store, DynamoDB?)
Any specific use cases or requirements I'm missing?
I did a quick comparison across all three Powertools implementations and found that TypeScript is missing several utilities that Python has (Feature Flags, Data Masking, Streaming, etc.). Feature Flags feels like it would have the biggest impact for most users.
Would love to hear thoughts from the maintainers too - is this something on the roadmap? I'm really keen to contribute and would be happy to help implement this if there's interest! 🙌
I've been learning a lot from the existing codebase and the patterns used in other utilities. The quality of the project is impressive and I think adding Feature Flags would make it even more complete.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Flags utility for TypeScript - Bringing feature management to Powertools! 🚀
Hey folks! 👋
I'm a huge fan of the Powertools project and have been exploring all three implementations (TypeScript, Python, and Java). The libraries are fantastic and I'd love to contribute! While diving into the different versions, I noticed something really cool that we're missing in TypeScript - the Feature Flags utility.
The Python implementation is pretty slick
The Python version has this awesome Feature Flags utility that provides a simple rule engine to evaluate when features should be enabled. It's super handy for:
What would this look like in TypeScript?
I'm imagining something like:
Why this would be awesome
Current workarounds
Right now, TypeScript users have to either:
Questions for the community
I did a quick comparison across all three Powertools implementations and found that TypeScript is missing several utilities that Python has (Feature Flags, Data Masking, Streaming, etc.). Feature Flags feels like it would have the biggest impact for most users.
Would love to hear thoughts from the maintainers too - is this something on the roadmap? I'm really keen to contribute and would be happy to help implement this if there's interest! 🙌
I've been learning a lot from the existing codebase and the patterns used in other utilities. The quality of the project is impressive and I think adding Feature Flags would make it even more complete.
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions