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.
- Loading branch information
1 parent
ca1a39e
commit 23ff952
Showing
5 changed files
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import subprocess | ||
|
||
|
||
def lambda_handler(event, context): | ||
|
||
subprocess.run(['git']) | ||
|
||
return 'test passed' |
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,25 @@ | ||
terraform { | ||
backend "local" { | ||
path = "terraform.tfstate" | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
module "lambda" { | ||
source = "../../" | ||
|
||
function_name = "terraform-aws-lambda-test-layers" | ||
description = "Test layers in terraform-aws-lambda" | ||
handler = "lambda.lambda_handler" | ||
runtime = "python3.7" | ||
|
||
layers = [ | ||
"arn:aws:lambda:::awslayer:AmazonLinux1803", # https://aws.amazon.com/blogs/compute/upcoming-updates-to-the-aws-lambda-execution-environment/ | ||
"arn:aws:lambda:eu-west-1:553035198032:layer:git:5", # https://github.com/lambci/git-lambda-layer | ||
] | ||
|
||
source_path = "${path.module}/lambda.py" | ||
} |
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