Skip to main content

Feature Store and Online Serving on AWS

A dual offline/online feature store on AWS using SageMaker Feature Store, Glue, and Kinesis to keep training and serving features consistent. It supports point-in-time-correct training sets and low-latency online lookups.

Cloud Provider
AWS
Components
7
Use Cases
3
Standards
5

Overview

A feature store is a central place to define, store, and serve the input signals (features) that models use. It solves two problems: teams stop rebuilding the same features, and the values used in training match the values used in production, which prevents training/serving skew. Use this architecture when several models share features or when feature logic is complex enough to need governance.

Components

  • SageMaker Feature Store: provides both an offline store (in S3) for training and an online store (low-latency) for serving, from the same feature definitions.
  • AWS Glue: batch jobs that compute features from curated data and write them to the store.
  • Amazon Kinesis + Lambda: a streaming path that computes fresh features from events in near real time.
  • DynamoDB: backs low-latency online reads for the most demanding lookups.
  • Amazon S3: durable storage for the offline feature history.
  • Athena: ad hoc SQL over offline features for analysis and point-in-time training set creation.

Data Flow

Batch features are computed by Glue on a schedule and ingested into the feature store, which writes to both the offline and online layers. Streaming features flow from Kinesis through Lambda and are upserted to the online store within seconds. Training jobs build point-in-time-correct datasets from the offline store via Athena, guaranteeing that each label sees only features available at that moment. Serving applications read the latest feature values from the online store before calling a model.

Scaling and Resilience

The online store scales reads automatically; provision DynamoDB capacity or use on-demand mode for spiky traffic. Glue and Kinesis scale with data volume and shard count. Make ingestion idempotent with feature keys and event timestamps so replays do not corrupt values. Replicate the online store across Availability Zones, and keep the offline store as the durable source of truth from which the online store can be rebuilt.

Security

Enforce feature-level access control so teams only read features they are entitled to. Apply data contracts so producers cannot silently change a feature's meaning or type. Encrypt both stores with KMS and restrict access with least-privilege IAM. Monitor feature freshness and null rates as data-quality signals, and alert when a feature pipeline stalls. Track lineage from raw source to each feature for audit.

Trade-offs and Alternatives

The managed SageMaker Feature Store removes infrastructure work but ties you to AWS; open-source Feast offers portability across clouds. Maintaining both batch and streaming paths adds complexity, so add streaming only for features that truly need freshness. Point-in-time correctness is essential but expensive to compute; precompute training sets for frequently retrained models. For a single model with simple features, a feature store may be overkill compared with computing features inline.