Skip to content

Commit

Permalink
default runtime to nodejs16.x
Browse files Browse the repository at this point in the history
Whilst the app runs on nodejs18.x, the AWS SKD supplied is version 3.x and this app references version 2.x. A lambda layer can be supplied for this to work.
nodejs16.x comes bundled with v2.x of the AWS SDK, so no futher intervention is required.
  • Loading branch information
SiCoe committed Oct 2, 2023
1 parent 183bf6b commit 483f7e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Detailed instructions on testing your function can be found [in the Wiki](https:
## Build Requirements

* [npm](https://www.npmjs.com/) ^7.20.0
* [node](https://nodejs.org/en/) ^18.0
* [node](https://nodejs.org/en/) ^16.0
* [openssl](https://www.openssl.org)

## Building Generic Packages
Expand Down
2 changes: 1 addition & 1 deletion infra/terraform/modules/_lambda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "aws_lambda_function" "main" {
role = aws_iam_role.lambda.arn
handler = "index.handler"
source_code_hash = base64sha256(var.package_url)
runtime = "nodejs18.x"
runtime = "nodejs16.x"
timeout = var.timeout
publish = var.lambda_at_edge
tags = var.tags
Expand Down
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Resources:
Properties:
CodeUri: distributions/{distribution_name}/{distribution_name}.zip
Role: !GetAtt LambdaEdgeFunctionRole.Arn
Runtime: nodejs18.x
Runtime: nodejs16.x
Handler: index.handler
Timeout: 5
AutoPublishAlias: LIVE
Expand Down

0 comments on commit 483f7e1

Please sign in to comment.