Skip to main content

OpenFeature AWS SSM Parameter Store Provider

This provider enables the use of AWS Systems Manager (SSM) Parameter Store as a backend for OpenFeature feature flags in Python.

Installation

pip install openfeature-provider-aws-ssm

For async support:

pip install openfeature-provider-aws-ssm[async]

Usage

Basic Usage

from openfeature import api
from openfeature.contrib.provider.awsssm import AwsSsmProvider

# Initialize the provider
provider = AwsSsmProvider()

# Set the provider
api.set_provider(provider)

# Get a client
client = api.get_client()

# Evaluate a flag
is_enabled = client.get_boolean_value("my-feature-flag", default_value=False)

With Configuration

from botocore.config import Config
from openfeature.contrib.provider.awsssm import (
    AwsSsmProvider,
    AwsSsmProviderConfig,
    CacheConfig,
)

config = AwsSsmProviderConfig(
    config=Config(
        region_name="us-west-2",
        retries={"max_attempts": 10, "mode": "standard"},
        connect_timeout=5,
        read_timeout=60,
    ),
    enable_decryption=True,  # For SecureString parameters
    cache_config=CacheConfig(
        cache_type="ttl",
        size=1000,
        ttl=300,  # 5 minutes in seconds
    ),
)

provider = AwsSsmProvider(config=config)
api.set_provider(provider)

Async Usage

from openfeature import api
from openfeature.contrib.provider.awsssm import AwsSsmProvider

provider = AwsSsmProvider()
api.set_provider(provider)

client = api.get_client()

# Async flag evaluation
is_enabled = await client.get_boolean_value_async(
    "my-feature-flag", default_value=False
)

Flag Key Mapping

Flag keys are mapped to SSM parameter names with the following rules:

  • If the flag key starts with /, it's used as-is
  • Otherwise, a leading / is automatically prepended

Examples:

  • Flag key my-feature → Parameter /my-feature
  • Flag key /app/prod/feature → Parameter /app/prod/feature

Flag Types

The provider supports all OpenFeature flag types:

OpenFeature Type SSM Parameter Value Parsing Rules
Boolean "true" or "false" Case-insensitive. Other values raise TypeMismatchError
String Any string Returned as-is
Integer "42", "-10" Parsed with int(). Invalid values raise TypeMismatchError
Float "3.14", "-2.5" Parsed with float(). Invalid values raise TypeMismatchError
Object Valid JSON Parsed as JSON object or array. Invalid JSON or primitives raise ParseError

Configuration Options

AwsSsmProviderConfig

Parameter Type Default Description
config botocore.config.Config None boto3 Config object (includes region_name, retries, timeouts, etc.)
endpoint_url str None Custom SSM endpoint URL (for testing with LocalStack/moto)
enable_decryption bool False Whether to decrypt SecureString parameters
cache_config CacheConfig CacheConfig() Configuration for the local cache

CacheConfig

The provider supports multiple caching strategies to optimize performance. To disable caching entirely, pass cache_config=None when creating the provider config.

Parameter Type Default Description
cache_type Literal["lru", "ttl"] "lru" Type of cache: "lru" (size-based) or "ttl" (time-based)
ttl int 300 Time-to-live for cached items in seconds (only used with cache_type="ttl")
size int 1000 Maximum number of items in the cache

Cache Types

  • "lru" (default): Least Recently Used cache with size-based eviction only. Cached values persist until evicted due to size limits.
  • "ttl": Time-To-Live cache with both time-based expiration AND size-based eviction. Cached values automatically expire after the configured TTL, even if space remains in the cache.

Cache Examples

# LRU cache (default) - size-based eviction only
cache_config=CacheConfig(cache_type="lru", size=500)

# TTL cache - expires after 60 seconds
cache_config=CacheConfig(cache_type="ttl", ttl=60, size=500)

# No caching - pass cache_config=None to the provider config
provider_config = AwsSsmProviderConfig(cache_config=None)

For more information on the Config object, see the boto3 configuration documentation.

License

Apache 2.0 - See LICENSE for more information.

Metadata

Release files for openfeature-provider-aws-ssm 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openfeature-provider-aws-ssm 0.1.1
File Size Uploaded
openfeature_provider_aws_ssm-0.1.1.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openfeature-provider-aws-ssm 0.1.1
File Interpreter ABI Platform
openfeature_provider_aws_ssm-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / openfeature_provider_aws_ssm-0.1.1.tar.gz

Download URL openfeature_provider_aws_ssm-0.1.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
15646a0f1cebb922aee30c7596dcdccad927ccc196c6f9aebe52e492a42491db
BLAKE2b-256 checksum
How to use checksums
800a88f3928b1587ad0b83998c80089bced9db2edac32fc644ce89f43e444834
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.

Transparency log

Release files / openfeature_provider_aws_ssm-0.1.1-py3-none-any.whl

Download URL openfeature_provider_aws_ssm-0.1.1-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26a36f005bc2b7c219e5c9117c74e3377482f6ba7151fb5856ec167527f0ab21
BLAKE2b-256 checksum
How to use checksums
8c5be205f6c4675a485dba987ba378f1fe0ee72811fa654587c7b560cafd976b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page