AWS Security ChangesHomeSearch

AWS sagemaker documentation change

Service: sagemaker · 2026-06-28 · Documentation low

File: sagemaker/latest/dg/feature-store-fraud-detection-notebook.md

Summary

Added SageMaker Python SDK v3 code examples throughout the notebook alongside existing v2 examples, covering feature group setup, creation, management, and deletion operations.

Security assessment

The changes exclusively add version-specific code samples for SDK v3 without modifying security configurations or mentioning security features. No vulnerabilities, security patches, or security incidents are referenced in the added content.

Diff

diff --git a/sagemaker/latest/dg/feature-store-fraud-detection-notebook.md b/sagemaker/latest/dg/feature-store-fraud-detection-notebook.md
index 680fe3c6a..67af8ac50 100644
--- a//sagemaker/latest/dg/feature-store-fraud-detection-notebook.md
+++ b//sagemaker/latest/dg/feature-store-fraud-detection-notebook.md
@@ -45,0 +46,29 @@ The role that you use to run the notebook must have the following managed polici
+SageMaker Python SDK v3
+    
+    
+    
+    import boto3
+    import sagemaker
+    from sagemaker.core.helper.session_helper import Session
+    from sagemaker.core.helper.session_helper import get_execution_role
+    
+    sagemaker_session = Session()
+    region = sagemaker_session.boto_region_name
+    boto_session = boto3.Session(region_name=region)
+    role = get_execution_role()
+    default_bucket = sagemaker_session.default_bucket()
+    prefix = 'sagemaker-featurestore'
+    offline_feature_store_bucket = 's3://{}/{}'.format(default_bucket, prefix)
+    
+    sagemaker_client = boto_session.client(service_name='sagemaker', region_name=region)
+    featurestore_runtime = boto_session.client(service_name='sagemaker-featurestore-runtime', region_name=region)
+    
+    feature_store_session = Session(
+        boto_session=boto_session,
+        sagemaker_client=sagemaker_client,
+        sagemaker_featurestore_runtime_client=featurestore_runtime
+    )
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -107,0 +137,11 @@ When you set up your feature groups, you need to customize the feature names wit
+SageMaker Python SDK v3
+    
+    
+    
+    from sagemaker.mlops.feature_store import FeatureGroup
+    
+    # No separate instantiation needed in v3; FeatureGroup.create() is called directly
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -114,0 +155,16 @@ For example, in the fraud detection example, the two feature groups are `identit
+SageMaker Python SDK v3
+    
+    
+    
+    import time
+    from time import gmtime, strftime, sleep
+    from sagemaker.mlops.feature_store import FeatureGroup
+    
+    identity_feature_group_name = 'identity-feature-group-' + strftime('%d-%H-%M-%S', gmtime())
+    transaction_feature_group_name = 'transaction-feature-group-' + strftime('%d-%H-%M-%S', gmtime())
+    
+    # No separate instantiation needed in v3; FeatureGroup.create() is called directly below
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -140,0 +197,10 @@ You can now load the feature definitions by passing a data frame containing the
+SageMaker Python SDK v3
+    
+    
+    
+    identity_feature_group.load_feature_definitions(data_frame=identity_data); # output is suppressed
+    transaction_feature_group.load_feature_definitions(data_frame=transformed_transaction_data); # output is suppressed
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -148,0 +215,23 @@ In this step, you use the `create` function to create the feature group. The fol
+SageMaker Python SDK v3
+    
+    
+    
+    # create a FeatureGroup
+    FeatureGroup.create(
+        description = "Some info about the feature group",
+        feature_group_name = feature_group_name,
+        record_identifier_name = record_identifier_name,
+        event_time_feature_name = event_time_feature_name,
+        feature_definitions = feature_definitions,
+        role_arn = role,
+        s3_uri = offline_feature_store_bucket,
+        enable_online_store = True,
+        online_store_kms_key_id = None,
+        offline_store_kms_key_id = None,
+        disable_glue_table_creation = False,
+        data_catalog_config = None,
+        tags = ["tag1","tag2"])
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -187,0 +277,10 @@ When you create a feature group, it takes time to load the data, and you need to
+SageMaker Python SDK v3
+    
+    
+    
+    fg = FeatureGroup.get(feature_group_name=feature_group_name)
+    status = fg.feature_group_status
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -221,0 +321,9 @@ You can retrieve information about your feature group with the `describe` functi
+SageMaker Python SDK v3
+    
+    
+    
+    FeatureGroup.get(feature_group_name=feature_group_name)
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -266,0 +375,9 @@ The SageMaker Python SDK’s `FeatureStore` class also provides the functionalit
+SageMaker Python SDK v3
+    
+    
+    
+    print(feature_group.as_hive_ddl())
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -313,0 +431,9 @@ You can delete a feature group with the `delete` function.
+SageMaker Python SDK v3
+    
+    
+    
+    feature_group.delete()
+
+SageMaker Python SDK v2 (Legacy)
+    
+    
@@ -317,0 +444,10 @@ The following code example is from the fraud detection example.
+
+SageMaker Python SDK v3
+    
+    
+    
+    identity_feature_group.delete()
+    transaction_feature_group.delete()
+
+SageMaker Python SDK v2 (Legacy)
+