Skip to content

Instantly share code, notes, and snippets.

@robcowie
Created November 21, 2018 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robcowie/25aec7eabe4b48094dd920baf70d7b6f to your computer and use it in GitHub Desktop.
Save robcowie/25aec7eabe4b48094dd920baf70d7b6f to your computer and use it in GitHub Desktop.
EMR cluster definition for boto3
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