Repository: cloudcomponents/cdk-constructs (language: python)

Issue:
`SlackApprovalAction` fails due to outdated node runtime in Lambda function
I'm trying to use the `SlackApprovalAction` from `@cloudcomponents/cdk-codepipeline-slack`, but I receive the following error when I run it:

```
Resource handler returned message: "The runtime parameter of nodejs10.x is no longer supported for 
creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while
creating or updating functions.
```

Is there any reason that lambda needs to use nodejs10.x? None of the lambdas are doing anything particularly complex so it *appears* to be safe to upgrade.


Discussion / hints:
There is no reason for that. It's just a mistake.

Fix patch:
diff --git a/packages/cdk-codepipeline-slack/src/slack-approval-action.ts b/packages/cdk-codepipeline-slack/src/slack-approval-action.ts
index d07d513b1..8a7be83cf 100644
--- a/packages/cdk-codepipeline-slack/src/slack-approval-action.ts
+++ b/packages/cdk-codepipeline-slack/src/slack-approval-action.ts
@@ -63,7 +63,7 @@ export class SlackApprovalAction extends Action {
     }
 
     const approvalRequester = new Function(scope, 'SlackApprovalRequesterFunction', {
-      runtime: Runtime.NODEJS_10_X,
+      runtime: Runtime.NODEJS_14_X,
       handler: 'index.handler',
       code: Code.fromAsset(path.join(__dirname, 'lambdas', 'approval-requester')),
       environment,
@@ -74,7 +74,7 @@ export class SlackApprovalAction extends Action {
     topic.addSubscription(new LambdaSubscription(approvalRequester));
 
     const approvalHandler = new Function(scope, 'SlackApprovalHandlerFunction', {
-      runtime: Runtime.NODEJS_10_X,
+      runtime: Runtime.NODEJS_14_X,
       handler: 'index.handler',
       code: Code.fromAsset(path.join(__dirname, 'lambdas', 'approval-handler')),
       environment,
diff --git a/packages/cdk-codepipeline-slack/src/slack-notifier.ts b/packages/cdk-codepipeline-slack/src/slack-notifier.ts
index 395558f6b..3cc39e8b2 100644
--- a/packages/cdk-codepipeline-slack/src/slack-notifier.ts
+++ b/packages/cdk-codepipeline-slack/src/slack-notifier.ts
@@ -46,7 +46,7 @@ export class SlackNotifier extends Construct {
     }
 
     const notifier = new Function(scope, 'SlackNotifierFunction', {
-      runtime: Runtime.NODEJS_12_X,
+      runtime: Runtime.NODEJS_14_X,
       handler: 'index.handler',
       code: Code.fromAsset(path.join(__dirname, 'lambdas', 'notifier')),
       environment: this.environment,
diff --git a/packages/cdk-contentful-webhook/lambda-file-sizes.json b/packages/cdk-contentful-webhook/lambda-file-sizes.json
index 2c273fcca..4db5f10f2 100644
--- a/packages/cdk-contentful-webhook/lambda-file-sizes.json
+++ b/packages/cdk-contentful-webhook/lambda-file-sizes.json
@@ -1,1 +1,1 @@
-[{"timestamp":1637517394655,"files":[{"filename":"contentful-webhook/index.js","previous":225899,"size":225902,"diff":3}]},{"timestamp":1633809671663,"files":[{"filename":"contentful-webhook/index.js","previous":231384,"size":225899,"diff":-5485}]},{"timestamp":1633807456780,"files":[{"filename":"contentful-webhook/index.js","previous":231381,"size":231384,"diff":3}]},{"timestamp":1620565790484,"files":[{"filename":"contentful-webhook/index.js","previous":231292,"size":231381,"diff":89}]},{"timestamp":1620265629961,"files":[{"filename":"contentful-webhook/index.js","previous":231381,"size":231292,"diff":-89}]},{"timestamp":1615923664936,"files":[{"filename":"contentful-webhook/index.js","previous":1050356,"size":231381,"diff":-818975}]},{"timestamp":1615923376037,"files":[{"filename":"contentful-webhook/index.js","previous":1047464,"size":1050356,"diff":2892}]},{"timestamp":1615809010241,"files":[{"filename":"contentful-webhook/index.js","previous":221347,"size":1047464,"diff":826117}]},{"timestamp":1615022511778,"files":[{"filename":"contentful-webhook/index.js","previous":221344,"size":221347,"diff":3}]},{"timestamp":1609970894222,"files":[{"filename":"contentful-webhook/index.js","previous":217379,"size":221344,"diff":3965}]},{"timestamp":1609970375754,"files":[{"filename":"contentful-webhook/index.js","previous":203415,"size":217379,"diff":13964}]},{"timestamp":1607360020128,"files":[{"filename":"contentful-webhook/index.js","previous":203418,"size":203415,"diff":-3}]},{"timestamp":1600966253111,"files":[{"filename":"contentful-webhook/index.js","previous":203440,"size":203418,"diff":-22}]},{"timestamp":1599246565057,"files":[{"filename":"contentful-webhook/index.js","previous":202993,"size":203440,"diff":447}]},{"timestamp":1598552652514,"files":[{"filename":"contentful-webhook/index.js","previous":202992,"size":202993,"diff":1}]},{"timestamp":1596542526761,"files":[{"filename":"contentful-webhook/index.js","previous":207102,"size":202992,"diff":-4110}]},{"timestamp":1596540034638,"files":[{"filename":"contentful-webhook/index.js","previous":206593,"size":207102,"diff":509}]},{"timestamp":1596457456615,"files":[{"filename":"contentful-webhook/index.js","previous":206357,"size":206593,"diff":236}]},{"timestamp":1596440551356,"files":[{"filename":"contentful-webhook/index.js","previous":206424,"size":206357,"diff":-67}]},{"timestamp":1596437759972,"files":[{"filename":"contentful-webhook/index.js","previous":541950,"size":206424,"diff":-335526}]},{"timestamp":1596413723535,"files":[{"filename":"contentful-webhook/index.js","previous":542071,"size":541950,"diff":-121}]},{"timestamp":1596407623809,"files":[{"filename":"contentful-webhook/index.js","previous":191169,"size":542071,"diff":350902}]}]
+[{"timestamp":1639158550913,"files":[{"filename":"contentful-webhook/index.js","previous":225902,"size":225836,"diff":-66}]},{"timestamp":1637517394655,"files":[{"filename":"contentful-webhook/index.js","previous":225899,"size":225902,"diff":3}]},{"timestamp":1633809671663,"files":[{"filename":"contentful-webhook/index.js","previous":231384,"size":225899,"diff":-5485}]},{"timestamp":1633807456780,"files":[{"filename":"contentful-webhook/index.js","previous":231381,"size":231384,"diff":3}]},{"timestamp":1620565790484,"files":[{"filename":"contentful-webhook/index.js","previous":231292,"size":231381,"diff":89}]},{"timestamp":1620265629961,"files":[{"filename":"contentful-webhook/index.js","previous":231381,"size":231292,"diff":-89}]},{"timestamp":1615923664936,"files":[{"filename":"contentful-webhook/index.js","previous":1050356,"size":231381,"diff":-818975}]},{"timestamp":1615923376037,"files":[{"filename":"contentful-webhook/index.js","previous":1047464,"size":1050356,"diff":2892}]},{"timestamp":1615809010241,"files":[{"filename":"contentful-webhook/index.js","previous":221347,"size":1047464,"diff":826117}]},{"timestamp":1615022511778,"files":[{"filename":"contentful-webhook/index.js","previous":221344,"size":221347,"diff":3}]},{"timestamp":1609970894222,"files":[{"filename":"contentful-webhook/index.js","previous":217379,"size":221344,"diff":3965}]},{"timestamp":1609970375754,"files":[{"filename":"contentful-webhook/index.js","previous":203415,"size":217379,"diff":13964}]},{"timestamp":1607360020128,"files":[{"filename":"contentful-webhook/index.js","previous":203418,"size":203415,"diff":-3}]},{"timestamp":1600966253111,"files":[{"filename":"contentful-webhook/index.js","previous":203440,"size":203418,"diff":-22}]},{"timestamp":1599246565057,"files":[{"filename":"contentful-webhook/index.js","previous":202993,"size":203440,"diff":447}]},{"timestamp":1598552652514,"files":[{"filename":"contentful-webhook/index.js","previous":202992,"size":202993,"diff":1}]},{"timestamp":1596542526761,"files":[{"filename":"contentful-webhook/index.js","previous":207102,"size":202992,"diff":-4110}]},{"timestamp":1596540034638,"files":[{"filename":"contentful-webhook/index.js","previous":206593,"size":207102,"diff":509}]},{"timestamp":1596457456615,"files":[{"filename":"contentful-webhook/index.js","previous":206357,"size":206593,"diff":236}]},{"timestamp":1596440551356,"files":[{"filename":"contentful-webhook/index.js","previous":206424,"size":206357,"diff":-67}]},{"timestamp":1596437759972,"files":[{"filename":"contentful-webhook/index.js","previous":541950,"size":206424,"diff":-335526}]},{"timestamp":1596413723535,"files":[{"filename":"contentful-webhook/index.js","previous":542071,"size":541950,"diff":-121}]},{"timestamp":1596407623809,"files":[{"filename":"contentful-webhook/index.js","previous":191169,"size":542071,"diff":350902}]}]
diff --git a/packages/cdk-github-webhook/lambda-file-sizes.json b/packages/cdk-github-webhook/lambda-file-sizes.json
index a167385c8..e221d8744 100644
--- a/packages/cdk-github-webhook/lambda-file-sizes.json
+++ b/packages/cdk-github-webhook/lambda-file-sizes.json
@@ -1,1 +1,1 @@
-[{"timestamp":1637517397296,"files":[{"filename":"github-webhook/index.js","previous":262039,"size":262040,"diff":1}]},{"timestamp":1633809689104,"files":[{"filename":"github-webhook/index.js","previous":193368,"size":262039,"diff":68671}]},{"timestamp":1633809137901,"files":[{"filename":"github-webhook/index.js","previous":191869,"size":193368,"diff":1499}]},{"timestamp":1622147586657,"files":[{"filename":"github-webhook/index.js","previous":191792,"size":191869,"diff":77}]},{"timestamp":1620565795835,"files":[{"filename":"github-webhook/index.js","previous":191427,"size":191792,"diff":365}]},{"timestamp":1620265643898,"files":[{"filename":"github-webhook/index.js","previous":191792,"size":191427,"diff":-365}]},{"timestamp":1619038419269,"files":[{"filename":"github-webhook/index.js","previous":191797,"size":191792,"diff":-5}]},{"timestamp":1617394285426,"files":[{"filename":"github-webhook/index.js","previous":191760,"size":191797,"diff":37}]},{"timestamp":1616697789259,"files":[{"filename":"github-webhook/index.js","previous":191665,"size":191760,"diff":95}]},{"timestamp":1615923673723,"files":[{"filename":"github-webhook/index.js","previous":1011459,"size":191665,"diff":-819794}]},{"timestamp":1615923385141,"files":[{"filename":"github-webhook/index.js","previous":1008634,"size":1011459,"diff":2825}]},{"timestamp":1615809019316,"files":[{"filename":"github-webhook/index.js","previous":182432,"size":1008634,"diff":826202}]},{"timestamp":1615023549795,"files":[{"filename":"github-webhook/index.js","previous":182255,"size":182432,"diff":177}]},{"timestamp":1615022566740,"files":[{"filename":"github-webhook/index.js","previous":181954,"size":182255,"diff":301}]},{"timestamp":1614104217580,"files":[{"filename":"github-webhook/index.js","previous":181904,"size":181954,"diff":50}]},{"timestamp":1612464188131,"files":[{"filename":"github-webhook/index.js","previous":181855,"size":181904,"diff":49}]},{"timestamp":1611769329263,"files":[{"filename":"github-webhook/index.js","previous":181805,"size":181855,"diff":50}]},{"timestamp":1609970949480,"files":[{"filename":"github-webhook/index.js","previous":179020,"size":181805,"diff":2785}]},{"timestamp":1607360063925,"files":[{"filename":"github-webhook/index.js","previous":178533,"size":179020,"diff":487}]},{"timestamp":1606896280100,"files":[{"filename":"github-webhook/index.js","previous":177980,"size":178533,"diff":553}]},{"timestamp":1606329557431,"files":[{"filename":"github-webhook/index.js","previous":177960,"size":177980,"diff":20}]},{"timestamp":1604259061964,"files":[{"filename":"github-webhook/index.js","previous":177961,"size":177960,"diff":-1}]},{"timestamp":1600966304194,"files":[{"filename":"github-webhook/index.js","previous":177682,"size":177961,"diff":279}]},{"timestamp":1599246609676,"files":[{"filename":"github-webhook/index.js","previous":177721,"size":177682,"diff":-39}]},{"timestamp":1596542584192,"files":[{"filename":"github-webhook/index.js","previous":181657,"size":177721,"diff":-3936}]},{"timestamp":1596540416823,"files":[{"filename":"github-webhook/index.js","previous":181110,"size":181657,"diff":547}]},{"timestamp":1596457756702,"files":[{"filename":"github-webhook/index.js","previous":181095,"size":181110,"diff":15}]},{"timestamp":1596455025723,"files":[{"filename":"github-webhook/index.js","previous":473647,"size":181095,"diff":-292552}]},{"timestamp":1596407673941,"files":[{"filename":"github-webhook/index.js","previous":332785,"size":473647,"diff":140862}]}]
+[{"timestamp":1639158552522,"files":[{"filename":"github-webhook/index.js","previous":262040,"size":262001,"diff":-39}]},{"timestamp":1637517397296,"files":[{"filename":"github-webhook/index.js","previous":262039,"size":262040,"diff":1}]},{"timestamp":1633809689104,"files":[{"filename":"github-webhook/index.js","previous":193368,"size":262039,"diff":68671}]},{"timestamp":1633809137901,"files":[{"filename":"github-webhook/index.js","previous":191869,"size":193368,"diff":1499}]},{"timestamp":1622147586657,"files":[{"filename":"github-webhook/index.js","previous":191792,"size":191869,"diff":77}]},{"timestamp":1620565795835,"files":[{"filename":"github-webhook/index.js","previous":191427,"size":191792,"diff":365}]},{"timestamp":1620265643898,"files":[{"filename":"github-webhook/index.js","previous":191792,"size":191427,"diff":-365}]},{"timestamp":1619038419269,"files":[{"filename":"github-webhook/index.js","previous":191797,"size":191792,"diff":-5}]},{"timestamp":1617394285426,"files":[{"filename":"github-webhook/index.js","previous":191760,"size":191797,"diff":37}]},{"timestamp":1616697789259,"files":[{"filename":"github-webhook/index.js","previous":191665,"size":191760,"diff":95}]},{"timestamp":1615923673723,"files":[{"filename":"github-webhook/index.js","previous":1011459,"size":191665,"diff":-819794}]},{"timestamp":1615923385141,"files":[{"filename":"github-webhook/index.js","previous":1008634,"size":1011459,"diff":2825}]},{"timestamp":1615809019316,"files":[{"filename":"github-webhook/index.js","previous":182432,"size":1008634,"diff":826202}]},{"timestamp":1615023549795,"files":[{"filename":"github-webhook/index.js","previous":182255,"size":182432,"diff":177}]},{"timestamp":1615022566740,"files":[{"filename":"github-webhook/index.js","previous":181954,"size":182255,"diff":301}]},{"timestamp":1614104217580,"files":[{"filename":"github-webhook/index.js","previous":181904,"size":181954,"diff":50}]},{"timestamp":1612464188131,"files":[{"filename":"github-webhook/index.js","previous":181855,"size":181904,"diff":49}]},{"timestamp":1611769329263,"files":[{"filename":"github-webhook/index.js","previous":181805,"size":181855,"diff":50}]},{"timestamp":1609970949480,"files":[{"filename":"github-webhook/index.js","previous":179020,"size":181805,"diff":2785}]},{"timestamp":1607360063925,"files":[{"filename":"github-webhook/index.js","previous":178533,"size":179020,"diff":487}]},{"timestamp":1606896280100,"files":[{"filename":"github-webhook/index.js","previous":177980,"size":178533,"diff":553}]},{"timestamp":1606329557431,"files":[{"filename":"github-webhook/index.js","previous":177960,"size":177980,"diff":20}]},{"timestamp":1604259061964,"files":[{"filename":"github-webhook/index.js","previous":177961,"size":177960,"diff":-1}]},{"timestamp":1600966304194,"files":[{"filename":"github-webhook/index.js","previous":177682,"size":177961,"diff":279}]},{"timestamp":1599246609676,"files":[{"filename":"github-webhook/index.js","previous":177721,"size":177682,"diff":-39}]},{"timestamp":1596542584192,"files":[{"filename":"github-webhook/index.js","previous":181657,"size":177721,"diff":-3936}]},{"timestamp":1596540416823,"files":[{"filename":"github-webhook/index.js","previous":181110,"size":181657,"diff":547}]},{"timestamp":1596457756702,"files":[{"filename":"github-webhook/index.js","previous":181095,"size":181110,"diff":15}]},{"timestamp":1596455025723,"files":[{"filename":"github-webhook/index.js","previous":473647,"size":181095,"diff":-292552}]},{"timestamp":1596407673941,"files":[{"filename":"github-webhook/index.js","previous":332785,"size":473647,"diff":140862}]}]


Test patch:
diff --git a/packages/cdk-codepipeline-slack/src/__tests__/__snapshots__/slack-approval-action.test.ts.snap b/packages/cdk-codepipeline-slack/src/__tests__/__snapshots__/slack-approval-action.test.ts.snap
index 8c08c642a..3bf63e2e6 100644
--- a/packages/cdk-codepipeline-slack/src/__tests__/__snapshots__/slack-approval-action.test.ts.snap
+++ b/packages/cdk-codepipeline-slack/src/__tests__/__snapshots__/slack-approval-action.test.ts.snap
@@ -344,7 +344,7 @@ Object {
             "Arn",
           ],
         },
-        "Runtime": "nodejs10.x",
+        "Runtime": "nodejs14.x",
       },
       "Type": "AWS::Lambda::Function",
     },
@@ -461,7 +461,7 @@ Object {
             "Arn",
           ],
         },
-        "Runtime": "nodejs10.x",
+        "Runtime": "nodejs14.x",
       },
       "Type": "AWS::Lambda::Function",
     },
@@ -1138,7 +1138,7 @@ Object {
             "Arn",
           ],
         },
-        "Runtime": "nodejs10.x",
+        "Runtime": "nodejs14.x",
       },
       "Type": "AWS::Lambda::Function",
     },
@@ -1255,7 +1255,7 @@ Object {
             "Arn",
           ],
         },
-        "Runtime": "nodejs10.x",
+        "Runtime": "nodejs14.x",
       },
       "Type": "AWS::Lambda::Function",
     },