The two changes made here are required for cross-region interoperability. When switching the region, the AMI IDs also change, so we need some way to keep the AMI reference consistent across regions (in this case, the AMI name was used and is resolved to the AMI ID at runtime). Also, switching the region with a command line argument does not make sense if there is no command line argument to specify the zone/placement of the instance. In order to pick the lowest spot prices, choosing the right zone within a region is crucial and we shouldn't make configurations for all combinations of zones/regions, duplicating a lot of other configuration data.
The two changes made here are required for cross-region interoperability. When switching the region, the AMI IDs also change, so we need some way to keep the AMI reference consistent across regions (in this case, the AMI name was used and is resolved to the AMI ID at runtime). Also, switching the region with a command line argument does not make sense if there is no command line argument to specify the zone/placement of the instance. In order to pick the lowest spot prices, choosing the right zone within a region is crucial and we shouldn't make configurations for all combinations of zones/regions, duplicating a lot of other configuration data.