From 1800e115e2004d14c25392ce89f5dcb1fab709de Mon Sep 17 00:00:00 2001 From: fujiwara Date: Tue, 13 Jun 2023 18:03:40 +0900 Subject: [PATCH 1/3] node 18.x --- README.md | 2 +- function_test.go | 4 ++-- init.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 41a6642..a3cd1e8 100644 --- a/README.md +++ b/README.md @@ -316,7 +316,7 @@ function.json is a definition for Lambda function. JSON structure is based from "Handler": "index.js", "MemorySize": 128, "Role": "arn:aws:iam::123456789012:role/hello_lambda_function", - "Runtime": "nodejs14.x", + "Runtime": "nodejs18.x", "Tags": { "Env": "dev" }, diff --git a/function_test.go b/function_test.go index 09f5984..9868f3d 100644 --- a/function_test.go +++ b/function_test.go @@ -70,7 +70,7 @@ func TestNewFunction(t *testing.T) { conf := &lambda.FunctionConfiguration{ FunctionName: aws.String("hello"), MemorySize: aws.Int64(128), - Runtime: aws.String("nodejs14.x"), + Runtime: aws.String("nodejs18.x"), Timeout: aws.Int64(3), Handler: aws.String("index.handler"), Role: aws.String("arn:aws:iam::0123456789012:role/YOUR_LAMBDA_ROLE_NAME"), @@ -85,7 +85,7 @@ func TestNewFunction(t *testing.T) { if *fn.MemorySize != 128 { t.Errorf("unexpected memory size got %d", *fn.MemorySize) } - if *fn.Runtime != "nodejs14.x" { + if *fn.Runtime != "nodejs18.x" { t.Errorf("unexpected runtime got %s", *fn.Runtime) } if *fn.Timeout != 3 { diff --git a/init.go b/init.go index b2b5b29..f1ec90c 100644 --- a/init.go +++ b/init.go @@ -35,7 +35,7 @@ func (app *App) Init(opt InitOption) error { c = &lambda.FunctionConfiguration{ FunctionName: opt.FunctionName, MemorySize: aws.Int64(128), - Runtime: aws.String("nodejs14.x"), + Runtime: aws.String("nodejs18.x"), Timeout: aws.Int64(3), Handler: aws.String("index.handler"), Role: aws.String( From f5d80a4df29931529f8731289308363884f565db Mon Sep 17 00:00:00 2001 From: fujiwara Date: Tue, 13 Jun 2023 18:11:49 +0900 Subject: [PATCH 2/3] add a section for edge. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index a3cd1e8..39cd5be 100644 --- a/README.md +++ b/README.md @@ -483,6 +483,17 @@ For example, For each line in `.lambdaignore` are evaluated as Go's [`path/filepath#Match`](https://godoc.org/path/filepath#Match). +### Lambda@Edge support + +lambroll can deploy [Lambda@Edge](https://aws.amazon.com/lambda/edge/) functions. + +Edge functions require two preconditions: + +- `--region` must set to `us-east-1`. +- The IAM Role must be assumed by `lambda.amazonaws.com` and `edgelambda.amazonaws.com` both. + +Otherwise, it works as usual. + ## LICENSE MIT License From 647f888c744d35dceec158f50c56e7aba0798c05 Mon Sep 17 00:00:00 2001 From: fujiwara Date: Tue, 13 Jun 2023 18:17:17 +0900 Subject: [PATCH 3/3] set locakstack version 1.4.0 --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7bcc120..9dbd932 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ jobs: services: localstack: - image: localstack/localstack + image: localstack/localstack:1.4.0 env: SERVICES: lambda,sts,s3 DEFAULT_REGION: ap-northeast-1