Summary
When launching from a custom AMI whose root snapshot is larger than spawn's default volume size, spawn launch fails with:
api error InvalidBlockDeviceMapping: Volume of size 20GB is smaller than snapshot 'snap-0e4706350e689...', expect size >= 80GB
The user is forced to pass --volume-size 80 explicitly, even though the correct minimum is already encoded in the AMI's block device mapping.
Expected behaviour
spawn launch --ami ami-0abc... should query the AMI's BlockDeviceMappings and use max(default_size, snapshot_minimum) as the volume size automatically — the same logic that the EC2 console applies when launching from a custom AMI.
Steps to reproduce
- Bake a custom AMI with an 80 GB root volume (common for data science / bioinformatics AMIs with large pre-installed databases)
spawn launch my-instance --ami <custom-ami-id> --instance-type t4g.small -y
- →
InvalidBlockDeviceMapping error
Workaround
Pass --volume-size 80 explicitly. This requires users to know the AMI's snapshot size out of band.
Context
https://github.com/scttfrdmn/aws-microbiome-demo — the demo bakes an AMI with 80 GB to fit Kraken2 + MetaPhlAn databases (~40 GB). Every instance launched from this AMI needs --volume-size 80, which isn't obvious and isn't documented anywhere in the AMI metadata shown to users.
Summary
When launching from a custom AMI whose root snapshot is larger than spawn's default volume size,
spawn launchfails with:The user is forced to pass
--volume-size 80explicitly, even though the correct minimum is already encoded in the AMI's block device mapping.Expected behaviour
spawn launch --ami ami-0abc...should query the AMI'sBlockDeviceMappingsand usemax(default_size, snapshot_minimum)as the volume size automatically — the same logic that the EC2 console applies when launching from a custom AMI.Steps to reproduce
spawn launch my-instance --ami <custom-ami-id> --instance-type t4g.small -yInvalidBlockDeviceMappingerrorWorkaround
Pass
--volume-size 80explicitly. This requires users to know the AMI's snapshot size out of band.Context
https://github.com/scttfrdmn/aws-microbiome-demo — the demo bakes an AMI with 80 GB to fit Kraken2 + MetaPhlAn databases (~40 GB). Every instance launched from this AMI needs
--volume-size 80, which isn't obvious and isn't documented anywhere in the AMI metadata shown to users.