Anton Tsyganov-BodounovLlewellyn van der Berg
Anton Tsyganov-Bodounov & Llewellyn van der Berg
Oct 07, 2025

Achieve Granular Cloud Resource Tracking with Dynamic Resource Labels

Dynamic Resource Label Documentation



Cloud resource and cost tracking for bioinformatics workflows remains a persistent operational need for bioinformatics teams today. Whilst Seqera Platform supports resource labels for AWS, Azure, and Google Cloud, achieving workflow-level cost granularity with standard resource labels requires manual configuration that doesn’t scale.

To track costs for individual workflow runs, teams have to manually add unique identifiers (key=value) to each execution. Some users work around this limitation by adding resource labels via the Nextflow resourceLabels directive in their pipeline code, hardcoding values that subsequently require manual updates. Others create separate compute environments for pipelines or groups, making trade-offs between operational simplicity and cost transparency.

Fundamentally, standard resource labels in Seqera cannot automatically assign unique identifiers to each workflow run based on user-selected keys. Without this capability, bioinformaticians face a choice between spending additional time maintaining manual labelling schemes across dozens of pipelines, or abandoning granular cost tracking entirely.

For organizations running multiple Nextflow workflows per day across different teams, this manual approach is untenable. Finance teams need per-workflow costs for accurate billing and planning. Project managers need to track spending against budgets. Infrastructure teams need to identify expensive workflows for optimization. Yet without automatic, unique labelling for every run, these requirements remain hard to reach.

Introducing Dynamic Resource Labels

Today, we are excited to announce dynamic resource labels — a new Seqera feature that solves the per-workflow cost tracking challenge by automatically tagging a run's cloud resources with its unique workflow and session identifiers. This removes the necessity for manual configuration, whether your workflows run in AWS, Azure, or Google Cloud.

Seqera now supports two new dynamic label values that are automatically evaluated at workflow runtime:

  • ${workflowId} – Automatically replaced with the unique Platform run identifier (e.g., 2mnBxxxxxxMxvY)
  • ${sessionId} – Automatically replaced with the Nextflow session UUID (e.g., bb4axxxx-xxxx-xxxx-xxxx-xxxxxxxx0f3c)

The key innovation is that these are not static values configured manually per workflow. They are template variables that Platform evaluates dynamically at submission and execution time. When you define a label like `workflow-run=${workflowId}` in your workspace settings, you can attach it to any workflow launched in that workspace to tag a run with its unique identifier. This feature removes the need for any pipeline code changes, manual updates, or per-launch configuration.

Workspace administrators can define dynamic resource labels once at the workspace level and optionally mark them to be attached by default to any new compute environment in the workspace. The labels are then automatically propagated to the cloud resources spawned by each run launched with the tagged compute environment, enabling precise cost allocation directly from your cloud provider's billing dashboard. Seqera handles the complexity of managing unique values for potentially thousands of concurrent runs whilst keeping the workspace settings clean and manageable.

With dynamic resource labels, every workflow run becomes individually trackable in your cloud provider's cost reports. Your teams can filter by specific workflow IDs to see exact costs, and generate accurate project billing without manual intervention for every workflow in your workspace.

This evolution from manual to automatic means cost tracking becomes accessible to every team member, not just those comfortable editing Nextflow configurations. The same powerful cost analysis capabilities remain, but the barrier to entry disappears.

Create and Apply Dynamic Resource Labels

Let’s walk through setting up dynamic resource labels in Seqera, running an example analysis, and reviewing the cost tags in AWS Cost Explorer.

Add dynamic resource labels to your workspace

To create a workspace dynamic resource label that tags a run’s resources with its unique Nextflow session ID, use the variable syntax ${sessionId} as the label’s value when it is defined:

sessionId=${sessionId}

  1. From the workspace settings page, select Edit labels > Add label.
  2. Enter a Name: e.g., sessionId.
  3. Enter a variable syntax Value: e.g., ${sessionId}.
  4. Optionally, enable Use as default in compute environment form to automatically apply this label to all new compute environments in this workspace.
  5. Select Add.
💡Hint: Dynamic resource labels can be configured in workspace settings by users with admin level permissions or higher.
Add a dynamic resource label to a workspace in Seqera Platform

Dynamic resource labels can be configured and applied to multiple Seqera entities. Once defined in your workspace settings, these labels become available for selection when you create new compute environments, pipeline configurations, and actions, and when you launch pipelines. Workspace default labels are prefilled and you can create new labels, including dynamic resource labels, on the fly.

Add dynamic resource labels during cloud compute environment creation. Workspace default labels are prefilled and can be overridden.

When you launch a pipeline run with dynamic resource labels attached, the dynamic values are automatically evaluated and assigned to their keys. Seqera tags the run with its unique values and the tags are attached to the cloud resources consumed by this run in your cloud provider console.

 Dynamic resource labels tag Seqera Platform runs with unique values. These values are propagated to the cloud provider resources consumed by the run.

Cost Tracking in AWS

Dynamic resource labels enable granular cost allocation in AWS by adding tags with unique workflow identifiers to the individual containers or instances that run your pipeline processes. To view per-workflow costs tagged with dynamic resource labels, simply activate cost allocation tags and enable split cost allocation data in your AWS Billing and Cost Management console. See the Platform documentation on including resource labels in AWS billing reports for more details.

💡Note: After you launch a Platform run with dynamic resource labels, it can take up to 24 hours for the tags to appear for activation, and an additional 24 hours after activation for them to appear in your cost reports.

View Costs in Data Exports and QuickSight dashboards

Once cost allocation tags are activated and split cost allocation data is enabled, your dynamic resource labels will appear in your Data Exports and Cost and Usage reports. You can then query these reports using Amazon Athena, visualize them with Amazon QuickSight (requires a QuickSight subscription), or export them for analysis. This allows you to filter and group costs by the individual Platform run IDs or Nextflow session IDs assigned by your dynamic resource labels.

For a complete walkthrough of setting up and querying AWS Cost and Usage Reports with resource labels, see our guide to AWS cost tracking with resource labels.

Cost Tracking in Google Cloud

The resources consumed by Platform runs with dynamic resource labels attached are tagged with unique run or session identifiers which can be viewed in your Google Cloud billing console.

Filter Google Cloud billing reports by unique Platform run or Nextflow session identifiers.
💡See View costs by resource labels in Google Cloud for more information.

Cost Tracking in Azure Cloud

In Azure Batch compute environments, the resources consumed by Platform runs with dynamic resource labels attached include metadata with unique run or session identifiers. In Azure Cloud (single VM, now in Preview on our production environment) compute environments, dynamic resource label values are propagated to Azure resources as tags which can be viewed in Azure Cost Management reports.

Filter Azure Cost Management reports by unique Platform run or Nextflow session identifiers.
💡Tags are only available for tenant resources associated with a subscription in Azure. See View costs by resource labels in Azure for more information.

Summary

Dynamic resource labels in Seqera deliver new possibilities for per-workflow cloud resource attribution and cost allocation. Whether you are running workflows on AWS, Azure, or Google Cloud, the initial dynamic variables ${workflowId} and ${sessionId} enable detailed cost tracking at the workflow level, giving organizations granular visibility of cloud costs.

A future release will introduce additional dynamic variables to enable cost tracking across multiple organizational dimensions:

  • User-level tracking through user name and ID.
  • Organizational structure through workspace and project names.
  • Workflow granularity via workflow, run, and pipeline names.

Future enhancements will expand customization further, allowing workspace administrators to create sophisticated dynamic resource label combinations using prefixes, suffixes, and concatenations.

Interested in learning more about Seqera?Seqera is the bioinformatics platform optimized for Nextflow to support your full pipeline development lifecycle, from data through to results.