|
14 | 14 | "ap-northeast-1",
|
15 | 15 | "ca-central-1",
|
16 | 16 | # "cn-north-1",
|
17 |
| - # "ap-northeast-3", #giving errror |
| 17 | + "ap-northeast-3", |
18 | 18 | "eu-central-1",
|
19 | 19 | "eu-west-1",
|
20 | 20 | "eu-west-2",
|
|
24 | 24 | "ap-east-1",
|
25 | 25 | "me-south-1",
|
26 | 26 | "eu-south-1",
|
27 |
| - "af-south-1" |
| 27 | + "af-south-1", |
| 28 | + "me-central-1", |
| 29 | + "eu-central-2", |
| 30 | + "ap-southeast-3" |
28 | 31 | ]
|
29 | 32 |
|
30 |
| - |
31 |
| -def get_bucket_name(bucket_prefix, region): |
32 |
| - if region in ("eu-north-1", "me-south-1", "ap-east-1", "af-south-1"): |
33 |
| - return '%s-%ss' % (bucket_prefix, region) |
34 |
| - return '%s-%s' % (bucket_prefix, region) |
| 33 | +region_map = { |
| 34 | + "us-east-1" : "appdevzipfiles-us-east-1", |
| 35 | + "us-east-2" : "appdevzipfiles-us-east-2", |
| 36 | + "us-west-1" : "appdevzipfiles-us-west-1", |
| 37 | + "us-west-2" : "appdevzipfiles-us-west-2", |
| 38 | + "ap-south-1": "appdevzipfiles-ap-south-1", |
| 39 | + "ap-northeast-2":"appdevzipfiles-ap-northeast-2", |
| 40 | + "ap-southeast-1":"appdevzipfiles-ap-southeast-1", |
| 41 | + "ap-southeast-2":"appdevzipfiles-ap-southeast-2", |
| 42 | + "ap-northeast-1":"appdevzipfiles-ap-northeast-1", |
| 43 | + "ca-central-1": "appdevzipfiles-ca-central-1", |
| 44 | + "eu-central-1":"appdevzipfiles-eu-central-1", |
| 45 | + "eu-west-1":"appdevzipfiles-eu-west-1", |
| 46 | + "eu-west-2":"appdevzipfiles-eu-west-2", |
| 47 | + "eu-west-3":"appdevzipfiles-eu-west-3", |
| 48 | + "eu-north-1":"appdevzipfiles-eu-north-1s", |
| 49 | + "sa-east-1":"appdevzipfiles-sa-east-1", |
| 50 | + "ap-east-1":"appdevzipfiles-ap-east-1s", |
| 51 | + "af-south-1":"appdevzipfiles-af-south-1s", |
| 52 | + "eu-south-1":"appdevzipfiles-eu-south-1", |
| 53 | + "me-south-1":"appdevzipfiles-me-south-1s", |
| 54 | + "me-central-1": "appdevzipfiles-me-central-1", |
| 55 | + "eu-central-2":"appdevzipfiles-eu-central-2ss", |
| 56 | + "ap-northeast-3" :"appdevzipfiles-ap-northeast-3s", |
| 57 | + "ap-southeast-3": "appdevzipfiles-ap-southeast-3" |
| 58 | +} |
| 59 | + |
| 60 | + |
| 61 | +def get_bucket_name(region): |
| 62 | + return region_map[region] |
35 | 63 |
|
36 | 64 |
|
37 | 65 | def upload_code_in_multiple_regions(filepath, bucket_prefix):
|
38 | 66 |
|
39 | 67 | for region in regions:
|
40 |
| - upload_code_in_S3(filepath, get_bucket_name(bucket_prefix, region), region) |
| 68 | + upload_code_in_S3(filepath, get_bucket_name(region), region) |
41 | 69 |
|
42 | 70 |
|
43 | 71 | def create_buckets(bucket_prefix):
|
|
0 commit comments