Skip to content

Commit

Permalink
fix(s3): Notifications fail to deploy due to incompatible node runtime (
Browse files Browse the repository at this point in the history
aws#13624)

This [PR](aws#13488) upgraded our Node runtimes from `10` to `14`. The problem is that Node14 isn't supported for lambda functions using inline code (i.e `ZipFile`). 

Change to Node12 specifically for the notification handler since it's the only one using `InlineLambda`. 

Fixes aws#13620

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
iliapolo authored and hollanddd committed Aug 26, 2021
1 parent d55cb9d commit 54756ff
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"Arn"
]
},
"Runtime": "nodejs14.x",
"Runtime": "nodejs12.x",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"Arn"
]
},
"Runtime": "nodejs14.x",
"Runtime": "nodejs12.x",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
"Arn"
]
},
"Runtime": "nodejs14.x",
"Runtime": "nodejs12.x",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"Arn"
]
},
"Runtime": "nodejs14.x",
"Runtime": "nodejs12.x",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"Arn"
]
},
"Runtime": "nodejs14.x",
"Runtime": "nodejs12.x",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class NotificationsResourceHandler extends Construct {
Code: { ZipFile: `exports.handler = ${handler.toString()};` },
Handler: 'index.handler',
Role: role.roleArn,
Runtime: 'nodejs14.x',
Runtime: 'nodejs12.x',
Timeout: 300,
},
});
Expand Down

0 comments on commit 54756ff

Please sign in to comment.