aws-sagemaker-pass-role-create-model
iam:PassRole to sagemaker.amazonaws.com for model creation, binding a role to be used at serving/transform time.
match (effective permission)
{
"action": "iam:PassRole",
"resource_type": "AWS::IAM::Role"
}
where
principal has sagemaker:CreateModel
iam:PassedToService condition (if present) includes sagemaker.amazonaws.com
target role trust policy allows sagemaker.amazonaws.com
emit
| source type | Identity |
|---|---|
| target type | MachineIdentity |
| source | <principal> |
| target | <IAM Role passable to sagemaker.amazonaws.com> |
| permissions | iam:PassRole sagemaker:CreateModel |
| conditions | iam_permission condition_expression role_compatibility |
Narrative
{principal.name} can create a SageMaker model passing {role.name} as its execution role (iam:PassRole + sagemaker:CreateModel), making the role available for use when the model is invoked via endpoint or transform job.
Raw rule rules/explicit/aws/sagemaker.yaml
id: aws-sagemaker-pass-role-create-model
emits: CanPassIdentity
description: iam:PassRole to sagemaker.amazonaws.com for model creation, binding a role to be used at
serving/transform time.
match_effective_permission:
action: iam:PassRole
resource_type: AWS::IAM::Role
where:
- principal has sagemaker:CreateModel
- iam:PassedToService condition (if present) includes sagemaker.amazonaws.com
- target role trust policy allows sagemaker.amazonaws.com
emit:
source_type: Identity
target_type: MachineIdentity
source: <principal>
target: <IAM Role passable to sagemaker.amazonaws.com>
permissions:
- iam:PassRole
- sagemaker:CreateModel
conditions:
- iam_permission
- condition_expression
- role_compatibility
false_positive_note: "Unlike training/processing jobs, CreateModel PassRole does not directly trigger\
\ code execution \u2014 the role is latent until an Endpoint or TransformJob uses the model. This\
\ is CanPassIdentity (role binding capability). Execution escalation is CONDITIONAL(service_state)\
\ on the model being deployed (endpoint created / transform job invoked)."
narrative: '{principal.name} can create a SageMaker model passing {role.name} as its execution role
(iam:PassRole + sagemaker:CreateModel), making the role available for use when the model is invoked
via endpoint or transform job.'