Skip to content

Commit

Permalink
Revert "change layer code to use nodejs18 code instead of 16 when run…
Browse files Browse the repository at this point in the history
…ning on lambdas with nodejs20 (#154)"

This reverts commit 4219206.
  • Loading branch information
ryantanjunming committed Oct 11, 2024
1 parent b4d6661 commit 0af2395
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/lambda-secretLayer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

## lambda-secretLayer

### 0.0.3 / 25.8.2024
* [update] Allow the layer to run in nodejs20 applications.

### 0.0.2 / 1.10.2023
* [Change] Change SSM option in the integration to SM - Secret Manager.

Expand Down
4 changes: 2 additions & 2 deletions src/lambda-secretLayer/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Metadata:
- lambda
- extension
HomePageUrl: https://coralogix.com
SemanticVersion: 1.0.3
SemanticVersion: 1.0.2
SourceCodeUrl: https://github.com/coralogix/coralogix-aws-serverless
Parameters:
CompatibleRuntimes:
Type: CommaDelimitedList
Description: Lambda Layer Version compatible runtimes
Default: nodejs16.x, nodejs18.x, nodejs14.x, nodejs20.x
Default: nodejs16.x, nodejs18.x, nodejs14.x
RetentionPolicy:
Type: String
Description: Lambda Layer Version retention policy
Expand Down
6 changes: 3 additions & 3 deletions src/lambda-secretLayer/wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

node_version=$(node -e "console.log(process.version)")

if [[ $node_version == v16.* || $node_version == v14.* ]]; then
node /opt/wrapper16.js
if [[ $node_version == v18.* ]]; then
node /opt/wrapper18.js
#cat /tmp/envVars

source /tmp/envVars
else
node /opt/wrapper18.js
node /opt/wrapper16.js
#cat /tmp/envVars

source /tmp/envVars
Expand Down
Binary file modified src/lambda-secretLayer/wrapper.zip
Binary file not shown.

0 comments on commit 0af2395

Please sign in to comment.