Skip to main content
Infrastructure events cover block loading, deployment pull step execution, workspace resource transfers, and infrastructure status tracking from integration packages. For more on blocks, see Blocks.

Block events

prefect.block.{type}.loaded

Emitted when a block is loaded from the server. The {type} portion is the block type slug (for example, prefect.block.slack-webhook.loaded or prefect.block.s3-bucket.loaded).

Resource

LabelDescription
prefect.resource.idprefect.block-document.{uuid}
prefect.resource.nameBlock document name
Resource ID patternRoleWhen present
prefect.block-type.{slug}block-typeAlways

Payload

This event has no payload.
Block subclasses can override the _event_method_called_resources() method to customize the resource and related resources for their events.

Deployment pull step events

prefect.flow-run.pull-step.executed

Emitted when a deployment pull step completes successfully during flow run infrastructure setup.

Resource

LabelDescription
prefect.resource.idprefect.flow-run.{uuid}
Resource ID patternRoleWhen present
prefect.deployment.{uuid}deploymentWhen the deployment is known

Payload

The payload contains the serialized step definition (the step’s fully qualified name and its input parameters as defined in prefect.yaml).

prefect.flow-run.pull-step.failed

Emitted when a deployment pull step fails during flow run infrastructure setup.

Resource

Same as prefect.flow-run.pull-step.executed. Same as prefect.flow-run.pull-step.executed.

Payload

Same as prefect.flow-run.pull-step.executed.

Workspace transfer events

prefect.workspace.transfer.started

Emitted when a workspace-to-workspace resource transfer begins (via prefect transfer).

Resource

LabelDescription
prefect.resource.idprefect.workspace.transfer.{uuid}
prefect.resource.nameDescription of the transfer direction (for example, local → cloud/my-workspace)
This event has no related resources.

Payload

FieldTypeDescription
source_profilestringName of the source Prefect profile
target_profilestringName of the target Prefect profile
source_urlstringAPI URL of the source
target_urlstringAPI URL of the target
total_resourcesintegerTotal number of resources to transfer

prefect.workspace.transfer.completed

Emitted when a workspace transfer completes.

Resource

Same as prefect.workspace.transfer.started. This event has no related resources.

Payload

FieldTypeDescription
source_profilestringName of the source Prefect profile
target_profilestringName of the target Prefect profile
source_urlstringAPI URL of the source
target_urlstringAPI URL of the target
total_resourcesintegerTotal number of resources transferred
succeededintegerNumber of resources transferred successfully
failedintegerNumber of resources that failed to transfer
skippedintegerNumber of resources skipped

Integration infrastructure events

The following events are emitted by Prefect integration packages to track infrastructure status changes during flow run execution. Each requires the respective integration package to be installed.

Docker events (prefect-docker)

The Docker worker emits events when container status changes during flow run execution.

prefect.docker.container.{status}

Emitted when a Docker container’s status changes. Events are chained using the follows field to track status progression.
Status variants
Event nameDescription
prefect.docker.container.createdContainer has been created
prefect.docker.container.runningContainer is running
prefect.docker.container.pausedContainer is paused
prefect.docker.container.restartingContainer is restarting
prefect.docker.container.removingContainer is being removed
prefect.docker.container.exitedContainer has exited
prefect.docker.container.deadContainer is in a dead state
Resource
LabelDescription
prefect.resource.idprefect.docker.container.{container-id}
prefect.resource.nameContainer name
Related resources
Resource ID patternRoleWhen present
prefect.flow-run.{uuid}flow-runWhen available from worker configuration
prefect.flow.{uuid}flowWhen available
prefect.deployment.{uuid}deploymentWhen available
prefect.work-pool.{uuid}work-poolWhen the worker is attached to a work pool
Worker resourceworkerAlways (the worker that manages the container)
Payload
This event has no payload.

prefect.docker.container.creation-failed

Emitted when a Docker container fails to be created. Same resource and related resources as prefect.docker.container.{status}.

Kubernetes events (prefect-kubernetes)

The Kubernetes observer emits events when pod phase changes are detected for pods labeled with prefect.io/flow-run-id.

prefect.kubernetes.pod.{phase}

Emitted when a Kubernetes pod transitions to a new phase. Events use deterministic IDs based on the pod UID, phase, and restart count for deduplication. Events within 5 minutes of each other are chained using the follows field.
Phase variants
Event nameDescription
prefect.kubernetes.pod.pendingPod is in the Pending phase
prefect.kubernetes.pod.runningPod is in the Running phase
prefect.kubernetes.pod.succeededPod completed successfully
prefect.kubernetes.pod.failedPod terminated with an error
prefect.kubernetes.pod.unknownPod is in an unknown state
prefect.kubernetes.pod.evictedPod was evicted from the node
Resource
LabelDescription
prefect.resource.idprefect.kubernetes.pod.{uid}
prefect.resource.namePod name
kubernetes.namespaceKubernetes namespace
kubernetes.reasonEviction reason (only for evicted pods)
Related resources
Resource ID patternRoleWhen present
prefect.flow-run.{uuid}flow-runAlways (from prefect.io/flow-run-id pod label)
prefect.deployment.{uuid}deploymentWhen prefect.io/deployment-id pod label is set
prefect.flow.{uuid}flowWhen prefect.io/flow-id pod label is set
prefect.work-pool.{uuid}work-poolWhen prefect.io/work-pool-id pod label is set
Worker nameworkerWhen prefect.io/worker-name pod label is set (includes prefect.worker-type: kubernetes)
Payload
This event has no payload.

AWS ECS events (prefect-aws)

The ECS observer emits events when ECS task status changes are detected via SQS for tasks tagged with prefect.io/flow-run-id.

prefect.ecs.task.{status}

Emitted when an ECS task transitions to a new status. Events use the AWS EventBridge event UUID for deterministic tracking. Events within 5 minutes of each other are chained using the follows field.
Status variants
Event nameDescription
prefect.ecs.task.provisioningTask resources are being provisioned
prefect.ecs.task.pendingTask is waiting to be placed on a container instance
prefect.ecs.task.activatingTask is being activated
prefect.ecs.task.runningTask is running
prefect.ecs.task.deactivatingTask is being deactivated
prefect.ecs.task.stoppingTask is being stopped
prefect.ecs.task.deprovisioningTask resources are being deprovisioned
prefect.ecs.task.stoppedTask has stopped
prefect.ecs.task.deletedTask has been deleted
Resource
LabelDescription
prefect.resource.idprefect.ecs.task.{task-id}
ecs.taskArnFull ECS task ARN
ecs.clusterArnECS cluster ARN (when available)
ecs.taskDefinitionArnECS task definition ARN (when available)
Related resources
Resource ID patternRoleWhen present
prefect.flow-run.{uuid}flow-runAlways (from prefect.io/flow-run-id task tag)
prefect.deployment.{uuid}deploymentWhen prefect.io/deployment-id task tag is set
prefect.flow.{uuid}flowWhen prefect.io/flow-id task tag is set
prefect.work-pool.{uuid}work-poolWhen prefect.io/work-pool-id task tag is set
Worker nameworkerWhen prefect.io/worker-name task tag is set (includes prefect.worker-type: ecs)
Payload
This event has no payload.