Skip to content

Commit cf70bcc

Browse files
authored
Merge pull request #115 from SumoLogic/hpal_new_region_support
Added 4 new regions
2 parents baffe70 + 3951f75 commit cf70bcc

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

cloudwatchlogs-with-dlq/DLQLambdaCloudFormation.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"LogStreamPrefix": {
3333
"Type": "String",
34-
"Description": "Enter comma separated list of logStream name prefixes to filter by logStream",
34+
"Description": "(Optional) Enter comma separated list of logStream name prefixes to filter by logStream. Please note this is seperate from a logGroup. This is used to only send certain logStreams within a cloudwatch logGroup(s). LogGroups still need to be subscribed to the created Lambda funciton, regardless of what is input for this value.",
3535
"Default": ""
3636
}
3737
},
@@ -46,12 +46,16 @@
4646
"ap-southeast-1": {"bucketname": "appdevzipfiles-ap-southeast-1"},
4747
"ap-southeast-2": {"bucketname": "appdevzipfiles-ap-southeast-2"},
4848
"ap-northeast-1": {"bucketname": "appdevzipfiles-ap-northeast-1"},
49+
"ap-east-1": {"bucketname": "appdevzipfiles-ap-east-1s"},
50+
"af-south-1": {"bucketname": "appdevzipfiles-af-south-1s"},
4951
"ca-central-1": {"bucketname": "appdevzipfiles-ca-central-1"},
5052
"eu-central-1": {"bucketname": "appdevzipfiles-eu-central-1"},
5153
"eu-west-1": {"bucketname": "appdevzipfiles-eu-west-1"},
5254
"eu-west-2": {"bucketname": "appdevzipfiles-eu-west-2"},
5355
"eu-west-3": {"bucketname": "appdevzipfiles-eu-west-3"},
5456
"eu-north-1": {"bucketname": "appdevzipfiles-eu-north-1s"},
57+
"eu-south-1": {"bucketname": "appdevzipfiles-eu-south-1"},
58+
"me-south-1": {"bucketname": "appdevzipfiles-me-south-1s"},
5559
"sa-east-1": {"bucketname": "appdevzipfiles-sa-east-1"}
5660
}
5761
},

deploy_function.py

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,33 @@
33
from argparse import ArgumentParser
44

55
regions = [
6-
"us-east-2",
7-
"us-east-1",
8-
"us-west-1",
9-
"us-west-2",
10-
"ap-south-1",
11-
"ap-northeast-2",
12-
"ap-southeast-1",
13-
"ap-southeast-2",
14-
"ap-northeast-1",
15-
"ca-central-1",
16-
# "cn-north-1",
17-
"eu-central-1",
18-
"eu-west-1",
19-
"eu-west-2",
20-
"eu-west-3",
21-
"eu-north-1",
22-
"sa-east-1"
6+
"us-east-2",
7+
"us-east-1",
8+
"us-west-1",
9+
"us-west-2",
10+
"ap-south-1",
11+
"ap-northeast-2",
12+
"ap-southeast-1",
13+
"ap-southeast-2",
14+
"ap-northeast-1",
15+
"ca-central-1",
16+
# "cn-north-1",
17+
# "ap-northeast-3", #giving errror
18+
"eu-central-1",
19+
"eu-west-1",
20+
"eu-west-2",
21+
"eu-west-3",
22+
"eu-north-1",
23+
"sa-east-1",
24+
"ap-east-1",
25+
"me-south-1",
26+
"eu-south-1",
27+
"af-south-1"
2328
]
2429

2530

2631
def get_bucket_name(bucket_prefix, region):
27-
if region == "eu-north-1":
32+
if region in ("eu-north-1", "me-south-1", "ap-east-1", "af-south-1"):
2833
return '%s-%ss' % (bucket_prefix, region)
2934
return '%s-%s' % (bucket_prefix, region)
3035

@@ -48,8 +53,10 @@ def create_buckets(bucket_prefix):
4853
'LocationConstraint': region
4954
})
5055
print("Creating bucket", region, response)
51-
except:
52-
pass
56+
except Exception as e:
57+
print(bucket_name, region)
58+
print(e)
59+
5360

5461

5562
def upload_code_in_S3(filepath, bucket_name, region):

0 commit comments

Comments
 (0)