The correct answer is C because AWS AppConfig feature flags support variants and targeting rules , which allow developers to enable different feature behavior for different audiences with minimal custom code. In this scenario, the requirement is to enable a premium feature only for a specific group of users identified by their user IDs . AppConfig can handle this directly by defining multiple flag variants and applying rules that target the intended users.
This is the solution with the least development effort because the targeting logic is managed in AppConfig instead of being implemented and maintained in the application code. AWS documentation for AppConfig feature flags emphasizes dynamic control of feature rollout, audience targeting, and safe configuration management. By configuring the targeting rules centrally, the developer can change which users receive the premium feature without redeploying the application.
Option A is less desirable because it pushes the user ID evaluation logic into the application, increasing development and maintenance effort. Option B is more cumbersome because creating separate feature flags for every user group does not scale well and adds administrative overhead. Option D is not the intended AppConfig pattern and introduces unnecessary complexity by requiring an external database lookup during flag evaluation.
Using one feature flag with multiple variants and targeting rules is the cleanest and most AWS-native design for selective rollout to a defined user segment. It keeps the configuration centralized, reduces code changes, and supports flexible future updates.
Therefore, the best solution is C .