Skip to content

Instantly share code, notes, and snippets.

@chicagobuss
Created August 2, 2019 21:56
Show Gist options
  • Save chicagobuss/87bdbe2b4323efc18fff3591a68ee425 to your computer and use it in GitHub Desktop.
Save chicagobuss/87bdbe2b4323efc18fff3591a68ee425 to your computer and use it in GitHub Desktop.
cost_structs
FIXED_HOURLY_COSTS = {
'DISKS': {
'aws': {
'us-east-1': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'us-east-2': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'us-west-1': {
'io1': 0.138 / 30 / 24,
'gp2': 0.12 / 30 / 24,
'st1': 0.054 / 30 / 24,
'sc1': 0.03 / 30 / 24
},
'us-west-2': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'ca-central-1': {
'io1': 0.138 / 30 / 24,
'gp2': 0.11 / 30 / 24,
'st1': 0.05 / 30 / 24,
'sc1': 0.028 / 30 / 24
},
'eu-central-1': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'eu-west-1': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'eu-west-2': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'eu-west-3': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'eu-north-1': {
'io1': 0.125 / 30 / 24,
'gp2': 0.1 / 30 / 24,
'st1': 0.045 / 30 / 24,
'sc1': 0.025 / 30 / 24
},
'ap-east-1': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'ap-northeast-1': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'ap-northeast-2': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'ap-northeast-3': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'ap-southeast-1': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'ap-southeast-2': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'ap-south-1': {
'io1': 0.1518 / 30 / 24,
'gp2': 0.132 / 30 / 24,
'st1': 0.0594 / 30 / 24,
'sc1': 0.033 / 30 / 24
},
'sa-east-1': {
'io1': 0.238 / 30 / 24,
'gp2': 0.19 / 30 / 24,
'st1': 0.086 / 30 / 24,
'sc1': 0.048 / 30 / 24
}
},
'gcp': {
'us-central1': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'europe-west1': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'us-east4': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'australia-southeast1': {
'pd-standard': 0.03024 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'europe-west4': {
'pd-standard': 0.02688 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'us-east1': {
'pd-standard': 0.02464 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'us-west1': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'europe-west3': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'us-west2': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'europe-west2': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'asia-east2': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
},
'europe-north1': {
'pd-standard': 0.0224 / 30 / 24,
'pd-ssd': 0.0816 / 30 / 24
}
}
},
'INSTANCES': {
'aws': {
'us-east-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'us-east-2': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'us-west-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'us-west-2': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ca-central-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'eu-central-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'eu-west-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'eu-west-2': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'eu-west-3': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'eu-north-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-east-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-northeast-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-northeast-2': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-northeast-3': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-southeast-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-southeast-2': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'ap-south-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
},
'sa-east-1': {
'r4.xlarge': 0.266,
'r5.xlarge': 0.26,
'm4.large': 0.18
}
},
'gcp': {
'us-central1': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'europe-west1': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'us-east4': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'australia-southeast1': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'europe-west4': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'us-east1': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'us-west1': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'europe-west3': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'us-west2': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'europe-west2': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'asia-east2': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
},
'europe-north1': {
'n1-highmem-4': 0.131,
'n1-standard-2': 0.095
}
}
},
'LBS': {
'aws': {
'alb': 0.0252,
'elb': 0.028,
'nlb': 0.0252
},
'gcp': {
'lb': 0.01
}
}
}
PER_GB_COSTS = {
'ZONE_CROSSING': {
'aws': {
'us-east-1': 0.007,
'us-east-2': 0.007,
'us-west-1': 0.007,
'us-west-2': 0.007,
'ca-central-1': 0.007,
'eu-central-1': 0.02,
'eu-west-1': 0.02,
'eu-west-2': 0.02,
'eu-west-3': 0.02,
'eu-north-1':0.02,
'ap-east-1': 0.02,
'ap-northeast-1': 0.02,
'ap-northeast-2': 0.02,
'ap-northeast-3': 0.02,
'ap-southeast-1': 0.02,
'ap-southeast-2': 0.02,
'ap-south-1': 0.02,
'sa-east-1': 0.02
},
'gcp': {
'us-central1': 0.007,
'europe-west1': 0.007,
'us-east4': 0.007,
'australia-southeast1': 0.007,
'europe-west4': 0.007,
'us-east1': 0.007,
'us-west1': 0.007,
'europe-west3': 0.007,
'us-west2': 0.007,
'europe-west2': 0.007,
'asia-east2': 0.007,
'europe-north1': 0.007
}
},
'LBS': {
'aws': {
'us-east-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'us-east-2': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'us-west-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'us-west-2': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ca-central-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'eu-central-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'eu-west-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'eu-west-2': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'eu-west-3': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'eu-north-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-east-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-northeast-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-northeast-2': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-northeast-3': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-southeast-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-southeast-2': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'ap-south-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
},
'sa-east-1': {
'alb': 0.008,
'elb': 0.008,
'nlb': 0.006
}
},
'gcp': {
'us-central1': {'lb': 0.00656 },
'europe-west1': {'lb': 0.00656 },
'us-east4': {'lb': 0.00738 },
'australia-southeast1': {'lb': 0.00902 },
'europe-west4': {'lb': 0.00738 },
'us-east1': {'lb': 0.00656 },
'us-west1': {'lb': 0.00738 },
'europe-west3': {'lb': 0.00820 },
'us-west2': {'lb': 0.00960 },
'europe-west2': {'lb': 0.00820 },
'asia-east2': {'lb': 0.00880 },
'europe-north1': {'lb': 0.00900 },
'northamerica-northeast1': {'lb': 0.00738 }
}
},
'VPC_EGRESS': {
'aws': {
'us-east-1': 0.009,
'us-east-2': 0.009,
'us-west-1': 0.009,
'us-west-2': 0.009,
'ca-central-1': 0.009,
'eu-central-1': 0.009,
'eu-west-1': 0.009,
'eu-west-2': 0.009,
'eu-west-3': 0.009,
'eu-north-1': 0.009,
'ap-east-1': 0.009,
'ap-northeast-1': 0.009,
'ap-northeast-2': 0.009,
'ap-northeast-3': 0.009,
'ap-southeast-1': 0.009,
'ap-southeast-2': 0.009,
'ap-south-1': 0.009,
'sa-east-1': 0.009
},
'gcp': {
'us-central1': 0.007,
'europe-west1': 0.007,
'us-east4': 0.007,
'australia-southeast1': 0.007,
'europe-west4': 0.007,
'us-east1': 0.007,
'us-west1': 0.007,
'europe-west3': 0.007,
'us-west2': 0.007,
'europe-west2': 0.007,
'asia-east2': 0.007,
'europe-north1': 0.007
},
'azure': {
}
},
'DISK_READS': {
'azure': {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment