boto/boto — pull request #435 by davidmarin (2011-12-13 23:55:51+00:00)
Title: make it possible not to send AmiVersion/HadoopVersion to the EMR AMI

It doesn't really work to explicitly default `HadoopVersion` to `'0.20'` because not all AMI versions support all Hadoop versions. For example:

```python

>>> import boto; conn = boto.connect_emr()
>>> jf = conn.run_jobflow('dave_test', 's3://dave-bucket/tmp/logs/', ami_version='2.0')
Traceback (most recent call last):
File "", line 1, in
File "boto/emr/connection.py", line 327, in run_jobflow
'RunJobFlow', params, RunJobFlowResponse, verb='POST')
File "boto/connection.py", line 884, in get_object
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EmrResponseError: EmrResponseError: 400 Bad Request

Sender
ValidationError
The requested AMI version does not support the requested Hadoop version

d2092075-25e4-11e1-8824-8345417d19a5

```

Setting `hadoop_version` to `''` or `None` doesn't really help; you have to do this:

```python
>>> jf = conn.run_jobflow('dave_test', 's3://dave-bucket/tmp/logs/', ami_version='2.0', hadoop_version='0.20.205')
```

This change makes it so that both `hadoop_version` and `ami_version` can be set to `None`, in which case we won't pass `HadoopVersion`/`AmiVersion` to the EMR API. It defaults `hadoop_version` to `None` (since it looks like most AMI versions will have only one Hadoop version going forward) and `ami_version` to `'latest'`, since not setting it effectively sets it to `1.0`. This should save you from having to update `ami_version`'s default value in later versions of `boto`.

For more details, see: http://docs.amazonwebservices.com/ElasticMapReduce/latest/API/index.html?API_RunJobFlow.html