We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.SageMakerFeatureStoreRuntime

Inherits:
AWS.Service show all
Identifier:
sagemakerfeaturestoreruntime
API Version:
2020-07-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Contains all data plane API operations and data types for the Amazon SageMaker Feature Store. Use this API to put, delete, and retrieve (get) features from a feature store.

Use the following operations to configure your OnlineStore and OfflineStore features, and to create and manage feature groups:

Sending a Request Using SageMakerFeatureStoreRuntime

var sagemakerfeaturestoreruntime = new AWS.SageMakerFeatureStoreRuntime();
sagemakerfeaturestoreruntime.batchGetRecord(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the SageMakerFeatureStoreRuntime object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var sagemakerfeaturestoreruntime = new AWS.SageMakerFeatureStoreRuntime({apiVersion: '2020-07-01'});

You can also set the API version globally in AWS.config.apiVersions using the sagemakerfeaturestoreruntime service identifier:

AWS.config.apiVersions = {
  sagemakerfeaturestoreruntime: '2020-07-01',
  // other service API versions
};

var sagemakerfeaturestoreruntime = new AWS.SageMakerFeatureStoreRuntime();

Version:

  • 2020-07-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.SageMakerFeatureStoreRuntime(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a SageMakerFeatureStoreRuntime object

var sagemakerfeaturestoreruntime = new AWS.SageMakerFeatureStoreRuntime({apiVersion: '2020-07-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.SageMakerFeatureStoreRuntime.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.SageMakerFeatureStoreRuntime.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.SageMakerFeatureStoreRuntime.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

batchGetRecord(params = {}, callback) ⇒ AWS.Request

Retrieves a batch of Records from a FeatureGroup.

Service Reference:

Examples:

Calling the batchGetRecord operation

var params = {
  Identifiers: [ /* required */
    {
      FeatureGroupName: 'STRING_VALUE', /* required */
      RecordIdentifiersValueAsString: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      FeatureNames: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ExpirationTimeResponse: Enabled | Disabled
};
sagemakerfeaturestoreruntime.batchGetRecord(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Identifiers — (Array<map>)

      A list containing the name or Amazon Resource Name (ARN) of the FeatureGroup, the list of names of Features to be retrieved, and the corresponding RecordIdentifier values as strings.

      • FeatureGroupNamerequired — (String)

        The name or Amazon Resource Name (ARN) of the FeatureGroup containing the records you are retrieving in a batch.

      • RecordIdentifiersValueAsStringrequired — (Array<String>)

        The value for a list of record identifiers in string format.

      • FeatureNames — (Array<String>)

        List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.

    • ExpirationTimeResponse — (String)

      Parameter to request ExpiresAt in response. If Enabled, BatchGetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, BatchGetRecord will return null.

      Possible values include:
      • "Enabled"
      • "Disabled"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Records — (Array<map>)

        A list of Records you requested to be retrieved in batch.

        • FeatureGroupNamerequired — (String)

          The FeatureGroupName containing Records you retrieved in a batch.

        • RecordIdentifierValueAsStringrequired — (String)

          The value of the record identifier in string format.

        • Recordrequired — (Array<map>)

          The Record retrieved.

          • FeatureNamerequired — (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 — (Array<String>)

            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.

        • ExpiresAt — (String)

          The ExpiresAt ISO string of the requested record.

      • Errors — (Array<map>)

        A list of errors that have occurred when retrieving a batch of Records.

        • FeatureGroupNamerequired — (String)

          The name of the feature group that the record belongs to.

        • RecordIdentifierValueAsStringrequired — (String)

          The value for the RecordIdentifier in string format of a Record from a FeatureGroup that is causing an error when attempting to be retrieved.

        • ErrorCoderequired — (String)

          The error code of an error that has occurred when attempting to retrieve a batch of Records. For more information on errors, see Errors.

        • ErrorMessagerequired — (String)

          The error message of an error that has occurred when attempting to retrieve a record in the batch.

      • UnprocessedIdentifiers — (Array<map>)

        A unprocessed list of FeatureGroup names, with their corresponding RecordIdentifier value, and Feature name.

        • FeatureGroupNamerequired — (String)

          The name or Amazon Resource Name (ARN) of the FeatureGroup containing the records you are retrieving in a batch.

        • RecordIdentifiersValueAsStringrequired — (Array<String>)

          The value for a list of record identifiers in string format.

        • FeatureNames — (Array<String>)

          List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRecord(params = {}, callback) ⇒ AWS.Request

Deletes a Record from a FeatureGroup in the OnlineStore. Feature Store supports both SoftDelete and HardDelete. For SoftDelete (default), feature columns are set to null and the record is no longer retrievable by GetRecord or BatchGetRecord. For HardDelete, the complete Record is removed from the OnlineStore. In both cases, Feature Store appends the deleted record marker to the OfflineStore. The deleted record marker is a record with the same RecordIdentifer as the original, but with is_deleted value set to True, EventTime set to the delete input EventTime, and other feature values set to null.

Note that the EventTime specified in DeleteRecord should be set later than the EventTime of the existing record in the OnlineStore for that RecordIdentifer. If it is not, the deletion does not occur:

  • For SoftDelete, the existing (not deleted) record remains in the OnlineStore, though the delete record marker is still written to the OfflineStore.

  • HardDelete returns EventTime: 400 ValidationException to indicate that the delete operation failed. No delete record marker is written to the OfflineStore.

When a record is deleted from the OnlineStore, the deleted record marker is appended to the OfflineStore. If you have the Iceberg table format enabled for your OfflineStore, you can remove all history of a record from the OfflineStore using Amazon Athena or Apache Spark. For information on how to hard delete a record from the OfflineStore with the Iceberg table format enabled, see Delete records from the offline store.

Service Reference:

Examples:

Calling the deleteRecord operation

var params = {
  EventTime: 'STRING_VALUE', /* required */
  FeatureGroupName: 'STRING_VALUE', /* required */
  RecordIdentifierValueAsString: 'STRING_VALUE', /* required */
  DeletionMode: SoftDelete | HardDelete,
  TargetStores: [
    OnlineStore | OfflineStore,
    /* more items */
  ]
};
sagemakerfeaturestoreruntime.deleteRecord(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FeatureGroupName — (String)

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

    • RecordIdentifierValueAsString — (String)

      The value for the RecordIdentifier that uniquely identifies the record, in string format.

    • EventTime — (String)

      Timestamp indicating when the deletion event occurred. EventTime can be used to query data at a certain point in time.

    • TargetStores — (Array<String>)

      A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the FeatureGroup.

    • DeletionMode — (String)

      The name of the deletion mode for deleting the record. By default, the deletion mode is set to SoftDelete.

      Possible values include:
      • "SoftDelete"
      • "HardDelete"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRecord(params = {}, callback) ⇒ AWS.Request

Use for OnlineStore serving from a FeatureStore. Only the latest records stored in the OnlineStore can be retrieved. If no Record with RecordIdentifierValue is found, then an empty result is returned.

Service Reference:

Examples:

Calling the getRecord operation

var params = {
  FeatureGroupName: 'STRING_VALUE', /* required */
  RecordIdentifierValueAsString: 'STRING_VALUE', /* required */
  ExpirationTimeResponse: Enabled | Disabled,
  FeatureNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
sagemakerfeaturestoreruntime.getRecord(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FeatureGroupName — (String)

      The name or Amazon Resource Name (ARN) of the feature group from which you want to retrieve a record.

    • RecordIdentifierValueAsString — (String)

      The value that corresponds to RecordIdentifier type and uniquely identifies the record in the FeatureGroup.

    • FeatureNames — (Array<String>)

      List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.

    • ExpirationTimeResponse — (String)

      Parameter to request ExpiresAt in response. If Enabled, GetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, GetRecord will return null.

      Possible values include:
      • "Enabled"
      • "Disabled"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Record — (Array<map>)

        The record you requested. A list of FeatureValues.

        • FeatureNamerequired — (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 — (Array<String>)

          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.

      • ExpiresAt — (String)

        The ExpiresAt ISO string of the requested record.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putRecord(params = {}, callback) ⇒ AWS.Request

The PutRecord API is used to ingest a list of Records into your feature group.

If a new record’s EventTime is greater, the new record is written to both the OnlineStore and OfflineStore. Otherwise, the record is a historic record and it is written only to the OfflineStore.

You can specify the ingestion to be applied to the OnlineStore, OfflineStore, or both by using the TargetStores request parameter.

You can set the ingested record to expire at a given time to live (TTL) duration after the record’s event time, ExpiresAt = EventTime + TtlDuration, by specifying the TtlDuration parameter. A record level TtlDuration is set when specifying the TtlDuration parameter using the PutRecord API call. If the input TtlDuration is null or unspecified, TtlDuration is set to the default feature group level TtlDuration. A record level TtlDuration supersedes the group level TtlDuration.

Service Reference:

Examples:

Calling the putRecord operation

var params = {
  FeatureGroupName: 'STRING_VALUE', /* required */
  Record: [ /* required */
    {
      FeatureName: 'STRING_VALUE', /* required */
      ValueAsString: 'STRING_VALUE',
      ValueAsStringList: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  TargetStores: [
    OnlineStore | OfflineStore,
    /* more items */
  ],
  TtlDuration: {
    Unit: Seconds | Minutes | Hours | Days | Weeks, /* required */
    Value: 'NUMBER_VALUE' /* required */
  }
};
sagemakerfeaturestoreruntime.putRecord(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FeatureGroupName — (String)

      The name or Amazon Resource Name (ARN) of the feature group that you want to insert the record into.

    • Record — (Array<map>)

      List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following:

      • Use GetRecord to retrieve the latest record.

      • Update the record returned from GetRecord.

      • Use PutRecord to update feature values.

      • FeatureNamerequired — (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 — (Array<String>)

        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.

    • TargetStores — (Array<String>)

      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.

    • TtlDuration — (map)

      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.

      • Unitrequired — (String)

        TtlDuration time unit.

        Possible values include:
        • "Seconds"
        • "Minutes"
        • "Hours"
        • "Days"
        • "Weeks"
      • Valuerequired — (Integer)

        TtlDuration time value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.