SageMaker feature group online stores with standard storage should be encrypted with AWS KMS keys
Checks that the feature group's online store, on standard storage, names a KMS key of yours. Without one the records are still encrypted, under an AWS owned key; a key of your own puts its policy, rotation and deletion under your control and logs every use in CloudTrail.
- service
- SageMaker
- severity
- Low
- scope
- evaluated in every region
How to fix it
- Replaces the resource: The key is fixed at creation: create a new feature group with it, reload the records and repoint readers and writers, then delete this one.
- Can break clients: Every caller of PutRecord, GetRecord or DeleteRecord on the new group also needs kms:Decrypt on the key, or its calls fail.
- Affects another check: A group that also has an offline store carries a second key, read by SageMaker.17; set both in the same replacement.
Settings
- OnlineStoreConfig.
SecurityConfig. KmsKeyId - A symmetric customer managed key whose policy gives the creator kms:CreateGrant and Feature Store's other permissions
With the AWS CLI
aws sagemaker create-feature-group --feature-group-name <feature-group-name> --record-identifier-feature-name <record-identifier> --event-time-feature-name <event-time-feature> --feature-definitions '[{"FeatureName":"<record-identifier>","FeatureType":"String"}]' --role-arn <execution-role-arn> --online-store-config '{"EnableOnlineStore":true,"StorageType":"Standard","SecurityConfig":{"KmsKeyId":"<kms-key-arn>"}}' --region <region>With Terraform
resource "aws_sagemaker_feature_group" "this" {
feature_group_name = var.feature_group_name
record_identifier_feature_name = var.record_identifier
event_time_feature_name = var.event_time_feature
role_arn = var.execution_role_arn
feature_definition {
feature_name = var.record_identifier
feature_type = "String"
}
online_store_config {
enable_online_store = true
storage_type = "Standard"
security_config {
kms_key_id = var.kms_key_arn
}
}
}
See which of your accounts this check is failing on.
Book a live scan