Skip to content

Commit

Permalink
Merge branch 'main' into fix-dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Jun 13, 2023
2 parents 1f1c7bc + 4b82872 commit 425cf5c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 425cf5c

Please sign in to comment.