January 05, 2016

How to specify ReleaseLabel for EMR cluster with Boto2

Boto is the AWS SDK for Python. You can create clusters, instances or anything using Boto. But sometimes Boto imposes limitations. I wanted to create a EMR cluster with RelaseLabel 4.2.0. But we were using Boto2. ReleaseLabel is an option in Boto3. For Boto2 there was no documented option for RelaseLabel.

So I found out a way to create EMR (Elastic Map Reduce) clusters using Boto 2 with a given ReleaseLabel.


I have commented AMI Version because ReleaseLabel will pick AMI version correctly. Above program will print the cluster ID in terminal. 

Sometimes you might get an issue saying "No Default VPC found.". This is a network related issue. In that case you might need to specify subnet ID for EMR cluster. Then you don't need to specify an availability zone.

1 comment: