Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Lambda support for Java 8 (Corretto) and custom runtimes on Amazon Linux 2 #14663

Merged
merged 4 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws/data_source_aws_lambda_layer_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func dataSourceAwsLambdaLayerVersion() *schema.Resource {
"compatible_runtime": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice(validLambdaRuntimes, false),
ValidateFunc: validation.StringInSlice(lambda.Runtime_Values(), false),
ConflictsWith: []string{"version"},
},
"compatible_runtimes": {
Expand Down
26 changes: 1 addition & 25 deletions aws/resource_aws_lambda_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,6 @@ import (

const awsMutexLambdaKey = `aws_lambda_function`

var validLambdaRuntimes = []string{
// lambda.RuntimeNodejs has reached end of life since October 2016 so not included here
lambda.RuntimeDotnetcore10,
lambda.RuntimeDotnetcore20,
lambda.RuntimeDotnetcore21,
lambda.RuntimeDotnetcore31,
lambda.RuntimeGo1X,
lambda.RuntimeJava8,
lambda.RuntimeJava11,
lambda.RuntimeNodejs43,
lambda.RuntimeNodejs43Edge,
lambda.RuntimeNodejs610,
lambda.RuntimeNodejs810,
lambda.RuntimeNodejs10X,
lambda.RuntimeNodejs12X,
lambda.RuntimeProvided,
lambda.RuntimePython27,
lambda.RuntimePython36,
lambda.RuntimePython37,
lambda.RuntimePython38,
lambda.RuntimeRuby25,
lambda.RuntimeRuby27,
}

func resourceAwsLambdaFunction() *schema.Resource {
return &schema.Resource{
Create: resourceAwsLambdaFunctionCreate,
Expand Down Expand Up @@ -166,7 +142,7 @@ func resourceAwsLambdaFunction() *schema.Resource {
"runtime": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(validLambdaRuntimes, false),
ValidateFunc: validation.StringInSlice(lambda.Runtime_Values(), false),
},
"timeout": {
Type: schema.TypeInt,
Expand Down
Loading