Amazon SageMaker Feature Store Runtime

2026/06/29 - Amazon SageMaker Feature Store Runtime - 2 new api methods

Changes  Add support for ListRecords and BatchWriteRecord APIs to Feature Store.

ListRecords (new) Link ¶

Lists the RecordIdentifier values of all records stored in a FeatureGroup's OnlineStore. This enables you to discover which records exist without retrieving the full record data.

See also: AWS API Documentation

Request Syntax

client.list_records(
    FeatureGroupName='string',
    MaxResults=123,
    NextToken='string',
    IncludeSoftDeletedRecords=True|False
)
type FeatureGroupName:

string

param FeatureGroupName:

[REQUIRED]

The name or Amazon Resource Name (ARN) of the feature group to list records from.

type MaxResults:

integer

param MaxResults:

The maximum number of record identifiers to return in a single page of results. For the InMemory tier, this value is a hint and not a strict requirement. The response may contain more or fewer results than the specified MaxResults.

type NextToken:

string

param NextToken:

A token to resume pagination of ListRecords results.

type IncludeSoftDeletedRecords:

boolean

param IncludeSoftDeletedRecords:

If set to true, the result includes records that have been soft deleted.

rtype:

dict

returns:

Response Syntax

{
    'RecordIdentifiers': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • RecordIdentifiers (list) --

      A list of record identifier values for the records stored in the OnlineStore.

      • (string) --

    • NextToken (string) --

      A token to resume pagination if the response includes more record identifiers than MaxResults.

BatchWriteRecord (new) Link ¶

Writes a batch of Records to one or more FeatureGroup``s. Use this API for bulk ingestion of records into the ``OnlineStore and OfflineStore.

You can set the ingested records to expire at a given time to live (TTL) duration after the record's event time by specifying the TtlDuration parameter. A request level TtlDuration applies to all entries that do not specify their own TtlDuration.

See also: AWS API Documentation

Request Syntax

client.batch_write_record(
    Entries=[
        {
            'FeatureGroupName': 'string',
            'Record': [
                {
                    'FeatureName': 'string',
                    'ValueAsString': 'string',
                    'ValueAsStringList': [
                        'string',
                    ]
                },
            ],
            'TargetStores': [
                'OnlineStore'|'OfflineStore',
            ],
            'TtlDuration': {
                'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks',
                'Value': 123
            }
        },
    ],
    TtlDuration={
        'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks',
        'Value': 123
    }
)
type Entries:

list

param Entries:

[REQUIRED]

A list of records to write. Each entry specifies the FeatureGroup, the record data, and optionally target stores and a TTL duration.

  • (dict) --

    An entry to write as part of a BatchWriteRecord request.

    • FeatureGroupName (string) -- [REQUIRED]

      The name or Amazon Resource Name (ARN) of the FeatureGroup to write the record to.

    • Record (list) -- [REQUIRED]

      List of FeatureValues to be inserted. This will be a full over-write.

      • (dict) --

        The value associated with a feature.

        • FeatureName (string) -- [REQUIRED]

          The name of a feature that a feature value corresponds to.

        • ValueAsString (string) --

          The value in string format associated with a feature. Used when your CollectionType is None. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

        • ValueAsStringList (list) --

          The list of values in string format associated with a feature. Used when your CollectionType is a List, Set, or Vector. Note that features types can be String, Integral, or Fractional. These values represents all three types as a string.

          • (string) --

    • TargetStores (list) --

      A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the FeatureGroup.

      • (string) --

    • TtlDuration (dict) --

      Time to live duration for this entry, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. This overrides the request level TtlDuration.

      • Unit (string) -- [REQUIRED]

        TtlDuration time unit.

      • Value (integer) -- [REQUIRED]

        TtlDuration time value.

type TtlDuration:

dict

param TtlDuration:

Time to live duration applied to all entries in the batch that do not specify their own TtlDuration; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.

  • Unit (string) -- [REQUIRED]

    TtlDuration time unit.

  • Value (integer) -- [REQUIRED]

    TtlDuration time value.

rtype:

dict

returns:

Response Syntax

{
    'Errors': [
        {
            'Entry': {
                'FeatureGroupName': 'string',
                'Record': [
                    {
                        'FeatureName': 'string',
                        'ValueAsString': 'string',
                        'ValueAsStringList': [
                            'string',
                        ]
                    },
                ],
                'TargetStores': [
                    'OnlineStore'|'OfflineStore',
                ],
                'TtlDuration': {
                    'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks',
                    'Value': 123
                }
            },
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ],
    'UnprocessedEntries': [
        {
            'FeatureGroupName': 'string',
            'Record': [
                {
                    'FeatureName': 'string',
                    'ValueAsString': 'string',
                    'ValueAsStringList': [
                        'string',
                    ]
                },
            ],
            'TargetStores': [
                'OnlineStore'|'OfflineStore',
            ],
            'TtlDuration': {
                'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks',
                'Value': 123
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Errors (list) --

      A list of errors that occurred when writing records in the batch.

      • (dict) --

        The error that has occurred when attempting to write a record in a batch.

        • Entry (dict) --

          The entry that failed to be written.

          • FeatureGroupName (string) --

            The name or Amazon Resource Name (ARN) of the FeatureGroup to write the record to.

          • Record (list) --

            List of FeatureValues to be inserted. This will be a full over-write.

            • (dict) --

              The value associated with a feature.

              • FeatureName (string) --

                The name of a feature that a feature value corresponds to.

              • ValueAsString (string) --

                The value in string format associated with a feature. Used when your CollectionType is None. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

              • ValueAsStringList (list) --

                The list of values in string format associated with a feature. Used when your CollectionType is a List, Set, or Vector. Note that features types can be String, Integral, or Fractional. These values represents all three types as a string.

                • (string) --

          • TargetStores (list) --

            A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the FeatureGroup.

            • (string) --

          • TtlDuration (dict) --

            Time to live duration for this entry, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. This overrides the request level TtlDuration.

            • Unit (string) --

              TtlDuration time unit.

            • Value (integer) --

              TtlDuration time value.

        • ErrorCode (string) --

          The error code for the failed record write.

        • ErrorMessage (string) --

          The error message for the failed record write.

    • UnprocessedEntries (list) --

      A list of entries that were not processed. These entries can be retried.

      • (dict) --

        An entry to write as part of a BatchWriteRecord request.

        • FeatureGroupName (string) --

          The name or Amazon Resource Name (ARN) of the FeatureGroup to write the record to.

        • Record (list) --

          List of FeatureValues to be inserted. This will be a full over-write.

          • (dict) --

            The value associated with a feature.

            • FeatureName (string) --

              The name of a feature that a feature value corresponds to.

            • ValueAsString (string) --

              The value in string format associated with a feature. Used when your CollectionType is None. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

            • ValueAsStringList (list) --

              The list of values in string format associated with a feature. Used when your CollectionType is a List, Set, or Vector. Note that features types can be String, Integral, or Fractional. These values represents all three types as a string.

              • (string) --

        • TargetStores (list) --

          A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the FeatureGroup.

          • (string) --

        • TtlDuration (dict) --

          Time to live duration for this entry, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. This overrides the request level TtlDuration.

          • Unit (string) --

            TtlDuration time unit.

          • Value (integer) --

            TtlDuration time value.