Skip to main content
Version: 26.1

Resource labels

Common issues experienced with resource labels in AWS, Azure, and GCP:

AWS Batch rejects a resource label defined in Nextflow configuration:

  • A run fails soon after it starts with an AWS Batch tag error similar to the following:

    Error executing process > 'NFCORE_RNASEQ:RNASEQ:SORTMERNA_INDEX ([])'
    Caused by:
    Tags can only contain letters, numbers, spaces, and the following special characters: _ . : / = + - @ (Service: Batch, Status Code: 400)
  • Resource labels set with the Nextflow resourceLabels directive skip Seqera validation and reach AWS Batch unchanged. AWS Batch rejects any tag value that contains characters other than letters, numbers, spaces, and _ . : / = + - @. A common cause is task.tag: a process with tag "$meta.id" and an empty meta input produces a task.tag value of []

  • To resolve, sanitize each label value in your Nextflow configuration:

    nextflow.config
    def sanitizeLabel(value) {
    // Replace disallowed characters and truncate to the 256-character tag value limit
    "${value}".replaceAll(/[^A-Za-z0-9 _.:\/=+@-]/, '_').take(256)
    }

    process {
    resourceLabels = { [
    pipelineTag: sanitizeLabel(task.tag),
    pipelineContainer: sanitizeLabel(task.container),
    pipelineRevision: sanitizeLabel(workflow.revision),
    pipelineCommitId: sanitizeLabel(workflow.commitId),
    ] }
    }
  • The "${value}" conversion turns unset properties, such as task.tag for a process without a tag directive, into the string null. Without it, replaceAll fails on null

  • This pattern matches AWS Batch tag rules only. Google Cloud labels allow only lowercase letters, numbers, underscores, and hyphens, up to 63 characters. Adjust the pattern and length limit for your provider

  • On Nextflow 26.10 and later, you can use tower.autoLabels for workflow metadata labels, such as the revision and commit ID. Nextflow normalizes these automatic labels for each cloud provider. Labels you declare with resourceLabels, such as task.tag, still need to be sanitized

Tags not appearing in cost reports:

  • Allow up to 24 hours for tags to appear in AWS cost allocation console
  • For Azure, enable tag inheritance and allow 24 hours for processing
  • Verify that resources are actively running and generating usage data

Permission errors:

  • Ensure compute environment credentials have the permissions required to tag resources
  • For Google Cloud, verify billing account administrator access
  • For Azure, confirm billing profile contributor permissions and appropriate permissions to view Cost Management reports

Missing tag values in cloud provider resources:

  • Verify that resource labels are applied to the correct compute environment
  • Check that workflows are using the tagged compute environment
  • For dynamic resource labels, ensure variables use correct syntax: ${sessionId}, ${userName}, or ${workflowId},

Costs missing for manually created AWS Batch queues:

  • Compute environments or job queues created manually, outside of Batch Forge, don't inherit Seqera's cost-allocation tags, so their costs don't appear in Cost Explorer or your data exports
  • Add the relevant cost-allocation tag (for example, project=<value>) to the manually created compute environments, job queues, and related resources in the AWS console
  • Prefer Batch Forge-created compute environments where possible, so tags propagate automatically

Cost data missing from the AWS data export:

  • Confirm that the cost-allocation tag keys are activated in the AWS Billing and Cost Management console of the payer (billing) account
  • Enable split cost allocation data in your Cost and Usage Report preferences — without it, downstream reporting returns blended-only or zero values
  • Allow a 24–48 hour delay for cost data to appear, then inspect the export (for example, query the Parquet files with Amazon Athena) to confirm the tag keys and their costs are present

Resource label tag keys look different in the AWS Cost and Usage Report:

  • AWS Cost and Usage Reports (version 2) normalize tag characters: colons (:) are rewritten as underscores (_), and mixed- or upper-case characters are lowercased and separated with underscores (for example, costCenter becomes cost_center)
  • Design resource-label keys and values that remain unambiguous after normalization, and reference the normalized key names in downstream Athena or QuickSight queries