SageMaker / Client / update_feature_group



Updates the feature group by either adding features or updating the online store configuration. Use one of the following request parameters at a time while using the UpdateFeatureGroup API.

You can add features for your feature group using the FeatureAdditions request parameter. Features cannot be removed from a feature group.

You can update the online store configuration by using the OnlineStoreConfig request parameter. If a TtlDuration is specified, the default TtlDuration applies for all records added to the feature group after the feature group is updated. If a record level TtlDuration exists from using the PutRecord API, the record level TtlDuration applies to that record instead of the default TtlDuration.

See also: AWS API Documentation

Request Syntax

response = client.update_feature_group(
            'FeatureName': 'string',
            'FeatureType': 'Integral'|'Fractional'|'String',
            'CollectionType': 'List'|'Set'|'Vector',
            'CollectionConfig': {
                'VectorConfig': {
                    'Dimension': 123
        'TtlDuration': {
            'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks',
            'Value': 123
  • FeatureGroupName (string) –


    The name or Amazon Resource Name (ARN) of the feature group that you’re updating.

  • FeatureAdditions (list) –

    Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you’ve made a valid request. It takes some time after you’ve made a valid request for Feature Store to update the feature group.

    • (dict) –

      A list of features. You must include FeatureName and FeatureType. Valid feature FeatureType``s are ``Integral, Fractional and String.

      • FeatureName (string) –

        The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted, write_time, api_invocation_time.

      • FeatureType (string) –

        The value type of a feature. Valid values are Integral, Fractional, or String.

      • CollectionType (string) –

        A grouping of elements where each element within the collection must have the same feature type ( String, Integral, or Fractional).

        • List: An ordered collection of elements.

        • Set: An unordered collection of unique elements.

        • Vector: A specialized list that represents a fixed-size array of elements. The vector dimension is determined by you. Must have elements with fractional feature types.

      • CollectionConfig (dict) –

        Configuration for your collection.


        This is a Tagged Union structure. Only one of the following top level keys can be set: VectorConfig.

        • VectorConfig (dict) –

          Configuration for your vector collection type.

          • Dimension: The number of elements in your vector.

          • Dimension (integer) – [REQUIRED]

            The number of elements in your vector.

  • OnlineStoreConfig (dict) –

    Updates the feature group online store configuration.

    • TtlDuration (dict) –

      Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.

      • Unit (string) –

        TtlDuration time unit.

      • Value (integer) –

        TtlDuration time value.

Return type:



Response Syntax

    'FeatureGroupArn': 'string'

Response Structure

  • (dict) –

    • FeatureGroupArn (string) –

      The Amazon Resource Number (ARN) of the feature group that you’re updating.


  • SageMaker.Client.exceptions.ResourceNotFound