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.

explicit aws emits CanPassIdentity

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 typeIdentity
target typeMachineIdentity
source<principal>
target<IAM Role passable to sagemaker.amazonaws.com>
permissionsiam:PassRole sagemaker:CreateModel
conditionsiam_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.'
move · open · esc close