Skip to main content

On This Page

Advanced Feature Flags: Faster Releases and Rapid Recovery (DEV320)

2 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

Why Feature Flags Are Your Secret Weapon

Amazon engineers demonstrated at AWS re:Invent 2025 (session DEV320) how feature flags are crucial for rapid software development and incident response. Steve Rice and Ben Shumpert showcased how Amazon utilizes AWS AppConfig to manage flags at scale, enabling faster releases and significantly lowering mean time to recovery (MTTR).

The session highlighted that while ideal software development models assume stable requirements, reality demands flexibility, and feature flags provide the necessary control to adapt to changing needs without costly and disruptive redeployments.

Key Insights

  • 2017 S3 outage caused by a configuration error: highlighted the need for robust configuration management.
  • Multi-variant flags enable targeted feature releases: allowing different user segments to experience different functionality.
  • AWS AppConfig used by Amazon.com for peak event management: specifically throttling recommendations during Black Friday to manage backend load.

Working Example

# Example of retrieving a feature flag using the AWS AppConfig SDK for Python
import boto3

appconfig_client = boto3.client('appconfigdata')

application_identifier = 'YOUR_APPLICATION_ID'
environment_identifier = 'YOUR_ENVIRONMENT_ID'
configuration_profile_identifier = 'YOUR_CONFIGURATION_PROFILE_ID'

try:
    response = appconfig_client.get_latest_configuration(
        ConfigurationToken='YOUR_CONFIGURATION_TOKEN' # Initial token from bootstrap
    )
    
    content = response['Content'].read().decode('utf-8')
    # Assuming content is JSON
    import json
    config = json.loads(content)
    
    feature_flag_enabled = config.get('feature_flag_name', False) # Default to False if not found
    
    if feature_flag_enabled:
        print("Feature flag is enabled!")
        # Execute code for the enabled feature
    else:
        print("Feature flag is disabled.")
        # Execute code for the default behavior

except Exception as e:
    print(f"Error retrieving configuration: {e}")

Practical Applications

  • Amazon.com: Dynamically adjusts recommendation counts during peak events like Black Friday to maintain system stability.
  • Pitfall: Deploying configuration changes without a bake time can lead to widespread outages, as demonstrated by the 2017 S3 incident.

References:

Continue reading

Next article

Malicious npm Package 'lotusbail' Steals WhatsApp Data and Credentials

Related Content