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

Fix python version #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 3 additions & 5 deletions infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ resource "aws_s3_bucket_public_access_block" "website" {
depends_on = [aws_s3_bucket.website]
}


resource "aws_s3_bucket_policy" "website" {
bucket = aws_s3_bucket.website.id

policy = jsonencode({
Version = "2012-10-17"
Statement = [
Expand Down Expand Up @@ -153,7 +151,7 @@ resource "aws_lambda_permission" "apigw_lambda" {
resource "aws_lambda_layer_version" "test_lambda_layer" {
filename = "make_lamda_layer/python.zip"
layer_name = "test_lambda_layer"
compatible_runtimes = ["python3.8", "python3.7"]
compatible_runtimes = ["python3.11", "python3.7"]
}

resource "aws_lambda_function" "lambda" {
Expand All @@ -162,7 +160,7 @@ resource "aws_lambda_function" "lambda" {
role = data.aws_iam_role.role.arn
handler = "lambda.register_handler"
source_code_hash = data.archive_file.lambda_zip.output_base64sha256
runtime = "python3.8"
runtime = "python3.11"
timeout = 10
layers = [aws_lambda_layer_version.test_lambda_layer.arn] //lambda_layer here is the name
depends_on = [aws_lambda_layer_version.test_lambda_layer]
Expand Down Expand Up @@ -191,7 +189,7 @@ resource "aws_lambda_function" "scan" {
role = data.aws_iam_role.role.arn
handler = "lambda.scan_handler"
source_code_hash = data.archive_file.lambda_zip.output_base64sha256
runtime = "python3.8"
runtime = "python3.11"
timeout = 900

environment {
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ selenium-wire==4.2.0
certifi>=2023.7.22 # not directly required, pinned by Snyk to avoid a vulnerability
requests>=2.32.2 # not directly required, pinned by Snyk to avoid a vulnerability
urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability
Werkzeug==2.1.2
Werkzeug==2.1.2
Loading