aws-sagemaker-executes-as-model
A SageMaker Model executes as its ExecutionRoleArn at serving (endpoint) and batch-transform time.
match (record)
{
"field": "ExecutionRoleArn",
"resource_type": "AWS::SageMaker::Model"
}
where
ExecutionRoleArn is non-empty
model is used by an Endpoint or TransformJob
emit
| source type | GenericCompute |
|---|---|
| target type | MachineIdentity |
| source | <SageMaker Model> |
| target | <ExecutionRoleArn> |
| conditions | service_state |
Narrative
SageMaker model {model.name} runs inference code as {role.name} when serving or transforming data; the role's credentials are accessible within the inference container.
Raw rule rules/explicit/aws/sagemaker.yaml
id: aws-sagemaker-executes-as-model
emits: ExecutesAs
description: A SageMaker Model executes as its ExecutionRoleArn at serving (endpoint) and batch-transform
time.
match_record:
resource_type: AWS::SageMaker::Model
field: ExecutionRoleArn
where:
- ExecutionRoleArn is non-empty
- model is used by an Endpoint or TransformJob
emit:
source_type: GenericCompute
target_type: MachineIdentity
source: <SageMaker Model>
target: <ExecutionRoleArn>
state: CONDITIONAL
conditions:
- service_state
permissions: []
false_positive_note: The model's role is used when the model is invoked (real-time via endpoint or batch
via transform job). If neither endpoint nor transform job uses the model, this ExecutesAs edge is
latent (POTENTIAL). Caller of CreateEndpoint or CreateTransformJob does not need to PassRole (the
role was bound at CreateModel time). This is distinct from training/processing/pipeline job roles
which are passed per-job.
narrative: SageMaker model {model.name} runs inference code as {role.name} when serving or transforming
data; the role's credentials are accessible within the inference container.