Im trying to do a elastic mapreduce job with code below, but when I try this I get an error: InstanceProfile is required for creating cluster
Someone knows why Im getting this error?
def createmrjob(dict):
emr = boto.emr.connect_to_region('us-east-1')
print ""
print "Conected to Elastic MapReduce."
print "Creating Streaming step"
bucket = dict['bucket']
print bucket
step = StreamingStep(name='Test',
mapper=dict['mapper'],
reducer=dict['reducer'],
input=msg['datafile'],
output='s3n://'+bucket+'/uploadedfiles/')
print "Creating job flow"
jobid = emr.run_jobflow(name="Data Processing",
log_uri="s3://"+bucket+"/uploadedfiles/erm_logs/",
steps=[step],
num_instances = 1,
)
createmrjob(msg)
Aucun commentaire:
Enregistrer un commentaire