Skip to content

Feature: spawn snapshot create --tag k=v (and spawn launch --tag) for custom provenance tags #161

Closed

Description

@scttfrdmn

Use case

spawn snapshot create builds reference-data EBS snapshots (Kraken2 DB, MetaPhlAn DB, etc.) that live in the account long-term and get attached to many launches via --attach-volume. It auto-applies useful baseline tags — Name (from --name), spawn:snapshot-name, spawn:managed=true, spawn:source=ebs-direct — but there's no way to attach custom tags.

Months later, a 24 GB / 40 GB snapshot tagged only Name=kraken2-k2pluspf-16gb doesn't tell you: which project owns it, the exact DB version, where it came from, where it's meant to mount, or when/how it was built. Right now I have to bolt on aws ec2 create-tags after every build:

spawn snapshot create --from s3://.../k2_pluspf_16_GB_20260226.tar.gz --size 24 --name kraken2-k2pluspf-16gb
aws ec2 create-tags --resources snap-xxx --tags Key=project,Value=... Key=db-version,Value=... Key=mount,Value=... ...

Request

A repeatable --tag key=value on spawn snapshot create:

spawn snapshot create --from ... --size 24 --name kraken2-k2pluspf-16gb \
  --tag project=aws-microbiome-demo \
  --tag db-version=k2_pluspf_16_GB_20260226 \
  --tag mount=/opt/databases/kraken2

Custom tags merged with (not overriding) the spawn:* baseline. The created snapshot carries them from birth — no post-hoc create-tags.

Also nice (same theme)

  • spawn launch --tag k=v — tag the instance (+ created data volumes) so ephemeral spores and their --attach-volume volumes are attributable in Cost Explorer / cleanup scripts. (Couldn't find an existing launch --tag; if it exists, disregard.)
  • Optionally have --attach-volume propagate the source snapshot's tags onto the created volume, so a volume is traceable back to its DB.

Context

From the aws-microbiome-demo Graviton work — moved Kraken2 + MetaPhlAn reference DBs onto EBS snapshots (via spawn snapshot create + ext.volumes). Wrote a tag_db_snapshot.sh wrapper to apply a consistent provenance schema, but it'd be cleaner as a native --tag. spawn 0.49.0.

Activity

  1. added
    enhancement
    on Jun 14, 2026
  2. scttfrdmn commented on Jun 14, 2026

    @scttfrdmn
    ContributorAuthor

    Shipped in v0.50.0 (#162). All three:

    • spawn snapshot create --tag k=v (repeatable) — custom tags set at creation, merged with the spawn:* baseline (can't override it):
      spawn snapshot create --from ... --size 24 --name kraken2-k2pluspf-16gb \
        --tag project=aws-microbiome-demo --tag db-version=k2_pluspf_16_GB_20260226 --tag mount=/opt/databases/kraken2
      
      No more post-hoc create-tags / tag_db_snapshot.sh.
    • spawn launch --tag k=v (repeatable) — tags the instance and its created volumes (you were right, there was no launch --tag). The spawn: prefix is reserved.
    • --attach-volume tag propagation — the volume created from a snapshot inherits the snapshot's custom tags (not its Name/spawn:* baseline, so it doesn't get stamped with the snapshot's identity) plus spawn:from-snapshot=<snap-id>, so a volume is traceable back to its DB.

    brew upgrade spawn / scoop update spawn once v0.50.0's release finishes. You can retire tag_db_snapshot.sh — the native --tag carries the same provenance schema from birth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions