From 75f11c8fe80a14161147e7fae99238e39ea09ca5 Mon Sep 17 00:00:00 2001 From: Eliot Jordan Date: Mon, 16 Dec 2024 13:57:09 -0600 Subject: [PATCH 1/2] Update to Node 22 --- .tool-versions | 2 ++ template.yml | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..26c0dbd --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +nodejs 22.10.0 +yarn 1.22.22 diff --git a/template.yml b/template.yml index 9719c3a..24eb025 100644 --- a/template.yml +++ b/template.yml @@ -170,16 +170,16 @@ Resources: Description: Dependencies for IIIF app ContentUri: ./dependencies CompatibleRuntimes: - - nodejs14.x + - nodejs22.x LicenseInfo: "Apache-2.0" Metadata: - BuildMethod: nodejs14.x + BuildMethod: nodejs22.x LambdaEdgeFunctionForwardedFor: Type: AWS::Serverless::Function Properties: CodeUri: ./src_edge Role: !GetAtt LambdaEdgeFunctionRole.Arn - Runtime: nodejs12.x + Runtime: nodejs22.x Handler: index.viewerRequest Timeout: 5 AutoPublishAlias: live @@ -235,7 +235,7 @@ Resources: IiifFunction: Type: "AWS::Serverless::Function" Properties: - Runtime: nodejs14.x + Runtime: nodejs22.x Handler: index.handler MemorySize: !Ref IiifLambdaMemory Timeout: @@ -243,7 +243,7 @@ Resources: CodeUri: ./src Layers: - Ref: Dependencies - - 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node12-x:22' + - 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node22-x:117' Policies: - AWSLambdaExecute - Version: "2012-10-17" From 25b10c94528b4267d857dd9b70a2f063a19e18f0 Mon Sep 17 00:00:00 2001 From: Eliot Jordan Date: Mon, 16 Dec 2024 13:58:14 -0600 Subject: [PATCH 2/2] Add install instructions to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 899c3ec..428419b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ Forked from [nulib/serverless-iiif](https://github.com/nulib/serverless-iiif). +### Initial Setup +```sh +brew install aws-sam-cli +asdf install +yarn install +``` ## Deployment * Set up a `figgy-deploy` AWS profile. You can get the AccessID/AccessKey from