Skip to content

Commit 56e8478

Browse files
committed
Updating cw with DLQ lambda to node 16.x
1 parent b3c2816 commit 56e8478

File tree

3 files changed

+50
-14
lines changed

3 files changed

+50
-14
lines changed

cloudwatchlogs-with-dlq/DLQLambdaCloudFormation.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@
5656
"eu-north-1": {"bucketname": "appdevzipfiles-eu-north-1s"},
5757
"eu-south-1": {"bucketname": "appdevzipfiles-eu-south-1"},
5858
"me-south-1": {"bucketname": "appdevzipfiles-me-south-1s"},
59-
"sa-east-1": {"bucketname": "appdevzipfiles-sa-east-1"}
59+
"sa-east-1": {"bucketname": "appdevzipfiles-sa-east-1"},
60+
"me-central-1": {"bucketname": "appdevzipfiles-me-central-1"},
61+
"eu-central-2": {"bucketname": "appdevzipfiles-eu-central-2ss"},
62+
"ap-northeast-3": {"bucketname": "appdevzipfiles-ap-northeast-3s"},
63+
"ap-southeast-3": {"bucketname": "appdevzipfiles-ap-southeast-3"}
6064
}
6165
},
6266
"Resources": {
@@ -224,7 +228,7 @@
224228
}
225229
},
226230
"Handler": "cloudwatchlogs_lambda.handler",
227-
"Runtime": "nodejs14.x",
231+
"Runtime": "nodejs16.x",
228232
"MemorySize": 128,
229233
"Environment": {
230234
"Variables": {
@@ -286,7 +290,7 @@
286290
]
287291
}
288292
},
289-
"Runtime": "nodejs14.x",
293+
"Runtime": "nodejs16.x",
290294
"MemorySize": 128,
291295
"Environment": {
292296
"Variables": {

cloudwatchlogs-with-dlq/DLQLambdaCloudFormationWithSecuredEndpoint.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@
5656
"eu-north-1": {"bucketname": "appdevzipfiles-eu-north-1s"},
5757
"eu-south-1": {"bucketname": "appdevzipfiles-eu-south-1"},
5858
"me-south-1": {"bucketname": "appdevzipfiles-me-south-1s"},
59-
"sa-east-1": {"bucketname": "appdevzipfiles-sa-east-1"}
59+
"sa-east-1": {"bucketname": "appdevzipfiles-sa-east-1"},
60+
"me-central-1": {"bucketname": "appdevzipfiles-me-central-1"},
61+
"eu-central-2": {"bucketname": "appdevzipfiles-eu-central-2ss"},
62+
"ap-northeast-3": {"bucketname": "appdevzipfiles-ap-northeast-3s"},
63+
"ap-southeast-3": {"bucketname": "appdevzipfiles-ap-southeast-3"}
6064
}
6165
},
6266
"Resources": {
@@ -266,7 +270,7 @@
266270
}
267271
},
268272
"Handler": "cloudwatchlogs_lambda.handler",
269-
"Runtime": "nodejs14.x",
273+
"Runtime": "nodejs16.x",
270274
"MemorySize": 128,
271275
"Environment": {
272276
"Variables": {
@@ -327,7 +331,7 @@
327331
]
328332
}
329333
},
330-
"Runtime": "nodejs14.x",
334+
"Runtime": "nodejs16.x",
331335
"MemorySize": 128,
332336
"Environment": {
333337
"Variables": {

deploy_function.py

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"ap-northeast-1",
1515
"ca-central-1",
1616
# "cn-north-1",
17-
# "ap-northeast-3", #giving errror
17+
"ap-northeast-3",
1818
"eu-central-1",
1919
"eu-west-1",
2020
"eu-west-2",
@@ -24,20 +24,48 @@
2424
"ap-east-1",
2525
"me-south-1",
2626
"eu-south-1",
27-
"af-south-1"
27+
"af-south-1",
28+
"me-central-1",
29+
"eu-central-2",
30+
"ap-southeast-3"
2831
]
2932

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]
3563

3664

3765
def upload_code_in_multiple_regions(filepath, bucket_prefix):
3866

3967
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)
4169

4270

4371
def create_buckets(bucket_prefix):

0 commit comments

Comments
 (0)