Restricting Access to ML Artifacts
This lesson explains how datasets, features, model files, images, prompts, vector indexes and evaluation results are made readable and writable only by the identities that need them.
Learning outcomes
After completing this lesson, you will be able to:
- Restrict S3 data and model artefacts by prefix.
- Separate registry, feature store and image permissions.
- Scale access with ABAC.
Data and model artefacts in S3
Organize buckets and prefixes by team, project and stage (raw, curated, models), then grant each role access only to its prefixes with IAM policies and bucket policies. Use SSE-KMS with customer managed keys whose key policies allow only the needed roles to decrypt; this adds a second, independent control, because a role needs both S3 and KMS permissions. Bucket policies can require encryption, deny non-TLS requests (aws:SecureTransport) and restrict access to specific VPC endpoints. S3 Block Public Access should be on everywhere.
The following diagram shows which role may perform each action in the SageMaker Model Registry, so that no single person can deploy a model alone.

Lock down the artefacts
Registries, feature stores and images
Restrict Model Registry actions so only the MLOps pipeline role can register versions and only approvers can change approval status (sagemaker:UpdateModelPackage). Limit Feature Store read and write per feature group. ECR repository policies control who can push and pull images. For generative AI, restrict who can edit prompts in Prompt Management, update knowledge bases or guardrails, and read invocation logs, which may contain sensitive prompts.
Attribute-based access
As the number of projects grows, attribute-based access control (ABAC) with tags scales better than one policy per resource. Resources and roles are tagged with a project, and policies allow actions when aws:ResourceTag/project equals aws:PrincipalTag/project. SageMaker AI supports tag-based conditions on many resources, and requiring tags on creation (aws:RequestTag) keeps the scheme consistent. The following table summarises the controls.
| Artifact | Controls |
|---|---|
| Training data, models in S3 | Prefix-scoped IAM, bucket policies, SSE-KMS key policies |
| Model Registry | Restrict register and approval actions to specific roles |
| Feature groups | Per-feature-group read and write permissions |
| Container images | ECR repository policies, image scanning |
| Prompts, guardrails, knowledge bases | Restrict edit permissions; review changes |
| Many projects | ABAC with resource and principal tags |
Attribute-based access
Separating approval from training
An auditor finds that data scientists can both register models and approve them, so a single person could deploy an untested model.
- Allow
sagemaker:CreateModelPackageonly to the pipeline's execution role. - Allow
sagemaker:UpdateModelPackage(approval status) only to a model-risk reviewer role. - Deny both actions to data scientist roles, who can still view packages and metrics.
This separation of duties ensures every production model passes through the pipeline and an independent review.
Why separate who registers models from who approves them?
Show answer
So no single person can both create and release a model, which adds an independent check.
Exam Tips
Remember for the exam
- Scope S3 access by prefix and add KMS key policies as a second control.
- Separate who registers models from who approves them.
- ECR repository policies control image push and pull.
- Scale access control with tags (ABAC).
- Treat prompts, guardrails and invocation logs as sensitive artefacts.