Skip to content

Commit

Permalink
Merge pull request #25859 from hashicorp/td-python3.6-lambda-runtime-…
Browse files Browse the repository at this point in the history
…deprecated

Fix deprecated Lambda function runtime errors
  • Loading branch information
ewbankkit authored Jul 18, 2022
2 parents e3ff7e8 + 343a59d commit de1f280
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
17 changes: 11 additions & 6 deletions internal/service/lambda/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2130,26 +2130,31 @@ func TestAccLambdaFunction_runtimes(t *testing.T) {
}
for _, runtime := range lambda.Runtime_Values() {
// EOL runtimes.
// https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy.
switch runtime {
case lambda.RuntimeRuby25:
fallthrough
case lambda.RuntimeNodejs43Edge:
fallthrough
case lambda.RuntimeDotnetcore21:
fallthrough
case lambda.RuntimeDotnetcore20:
case lambda.RuntimePython27:
fallthrough
case lambda.RuntimeDotnetcore10:
case lambda.RuntimePython36:
fallthrough
case lambda.RuntimeRuby25:
fallthrough
case lambda.RuntimeNodejs10X:
fallthrough
case lambda.RuntimeNodejs810:
fallthrough
case lambda.RuntimeNodejs610:
fallthrough
case lambda.RuntimeNodejs43Edge:
fallthrough
case lambda.RuntimeNodejs43:
fallthrough
case lambda.RuntimeNodejs:
fallthrough
case lambda.RuntimeDotnetcore20:
fallthrough
case lambda.RuntimeDotnetcore10:
continue
}

Expand Down
4 changes: 2 additions & 2 deletions internal/service/sns/topic_subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ resource "aws_lambda_function" "lambda" {
role = aws_iam_role.iam_for_lambda.arn
handler = "main.confirm_subscription"
source_code_hash = filebase64sha256("test-fixtures/lambda_confirm_sns.zip")
runtime = "python3.6"
runtime = "python3.7"
}
resource "aws_api_gateway_deployment" "test" {
Expand Down Expand Up @@ -955,7 +955,7 @@ resource "aws_lambda_function" "lambda" {
role = aws_iam_role.iam_for_lambda.arn
handler = "main.confirm_subscription"
source_code_hash = filebase64sha256("test-fixtures/lambda_confirm_sns.zip")
runtime = "python3.6"
runtime = "python3.7"
}
resource "aws_api_gateway_deployment" "test" {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/api_gateway_integration.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ resource "aws_lambda_function" "lambda" {
function_name = "mylambda"
role = aws_iam_role.role.arn
handler = "lambda.lambda_handler"
runtime = "python3.6"
runtime = "python3.7"
source_code_hash = filebase64sha256("lambda.zip")
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/lambda_permission.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resource "aws_lambda_function" "func" {
function_name = "lambda_called_from_sns"
role = aws_iam_role.default.arn
handler = "exports.handler"
runtime = "python3.6"
runtime = "python3.7"
}
resource "aws_iam_role" "default" {
Expand Down Expand Up @@ -155,7 +155,7 @@ resource "aws_lambda_function" "logging" {
function_name = "lambda_called_from_cloudwatch_logs"
handler = "exports.handler"
role = aws_iam_role.default.arn
runtime = "python3.6"
runtime = "python3.7"
}
resource "aws_iam_role" "default" {
Expand Down

0 comments on commit de1f280

Please sign in to comment.