This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always run Python scripts with python
Removes python_cmd and shebangs. Now it will just use whatever version of Python it finds in the path. Adds tests for deploying Lambda functions with different Python versions while running different Python versions in the path. The .envrc files are used by Direnv to set the Python version when testing.
1 parent
967d464
commit df00955
Showing
16 changed files
with
79 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
layout python2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
terraform { | ||
backend "local" { | ||
path = "terraform.tfstate" | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
module "lambda_python2" { | ||
source = "../../../" | ||
|
||
function_name = "terraform-aws-lambda-test-python2-from-python2" | ||
description = "Test python2 runtime from python2 environment in terraform-aws-lambda" | ||
handler = "main.lambda_handler" | ||
runtime = "python2.7" | ||
timeout = 5 | ||
|
||
source_path = "${path.module}/../lambda" | ||
} | ||
|
||
module "lambda_python3" { | ||
source = "../../../" | ||
|
||
function_name = "terraform-aws-lambda-test-python3-from-python2" | ||
description = "Test python3 runtime from python2 environment in terraform-aws-lambda" | ||
handler = "main.lambda_handler" | ||
runtime = "python3.7" | ||
timeout = 5 | ||
|
||
source_path = "${path.module}/../lambda" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
layout python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
terraform { | ||
backend "local" { | ||
path = "terraform.tfstate" | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
module "lambda_python2" { | ||
source = "../../../" | ||
|
||
function_name = "terraform-aws-lambda-test-python2-from-python3" | ||
description = "Test python2 runtime from python3 environment in terraform-aws-lambda" | ||
handler = "main.lambda_handler" | ||
runtime = "python2.7" | ||
timeout = 5 | ||
|
||
source_path = "${path.module}/../lambda" | ||
} | ||
|
||
module "lambda_python3" { | ||
source = "../../../" | ||
|
||
function_name = "terraform-aws-lambda-test-python3-from-python3" | ||
description = "Test python3 runtime from python3 environment in terraform-aws-lambda" | ||
handler = "main.lambda_handler" | ||
runtime = "python3.7" | ||
timeout = 5 | ||
|
||
source_path = "${path.module}/../lambda" | ||
} |
This file was deleted.
Oops, something went wrong.