Aren't AMI ids supposed to be of the form `ami-...`?  If that's true, you can change this to

```python
if not opts.ami.startswith("ami-"):
```