Created
November 21, 2018 11:21
-
-
Save robcowie/25aec7eabe4b48094dd920baf70d7b6f to your computer and use it in GitHub Desktop.
EMR cluster definition for boto3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLUSTER_DEFINITION = { | |
'Name': 'name', | |
'Instances': { | |
'InstanceGroups': [ | |
{ | |
'Name': 'Master', | |
'Market': 'SPOT', | |
'InstanceRole': 'MASTER', | |
'BidPrice': '1', | |
'InstanceType': 'r4.2xlarge', | |
'InstanceCount': 1 | |
'EbsConfiguration': { | |
'EbsBlockDeviceConfigs': [ | |
{ | |
'VolumeSpecification': { | |
'SizeInGB': 256, | |
'VolumeType': 'gp2' | |
}, | |
'VolumesPerInstance': 1 | |
}], | |
'EbsOptimized': True | |
} | |
}, | |
{ | |
'Name': 'Executors', | |
'Market': 'SPOT', | |
'InstanceRole': 'CORE', | |
'BidPrice': '0.8', | |
'InstanceType': 'c5d.9xlarge', | |
'InstanceCount': 20 | |
'EbsConfiguration': { | |
'EbsBlockDeviceConfigs': [ | |
{ | |
'VolumeSpecification': { | |
'SizeInGB': 256, | |
'VolumeType': 'gp2' | |
}, | |
'VolumesPerInstance': 1 | |
}], | |
'EbsOptimized': True | |
} | |
}], | |
'Ec2KeyName': '' | |
}, | |
'BootstrapActions': [ | |
{ | |
'Name': 'Installing dependencies', | |
'ScriptBootstrapAction': { | |
'Path': 's3://emr_bootstrap.sh' | |
} | |
} | |
], | |
'AutoTerminate': False | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment