Skip to content

Commit b73d344

Browse files
committed
downgrade to 3.9
1 parent 7b4c64e commit b73d344

File tree

14 files changed

+20
-24
lines changed

14 files changed

+20
-24
lines changed

lambdas/g_drive_folder_to_s3/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM ubuntu:latest
55
RUN apt-get update
66
RUN apt-get upgrade -y
77
RUN apt-get install -y zip
8-
RUN apt-get install -y python3.11 python3-pip
8+
RUN apt-get install -y python3.9 python3-pip
99

1010
RUN pip3 install pipenv
1111

@@ -18,7 +18,7 @@ COPY Pipfile Pipfile.lock /app/
1818
COPY main.py ./source/
1919

2020
# Install Python dependencies using pipenv
21-
RUN pipenv install
21+
RUN pipenv install
2222
RUN pipenv requirements > requirements.txt
2323
RUN pip install -t ./source/lib -r requirements.txt
2424

@@ -27,7 +27,3 @@ WORKDIR /app/source
2727
RUN zip -r g_drive_folder_to_s3.zip .
2828

2929
CMD "pyhon3", "main.py"
30-
31-
32-
33-

lambdas/kafka_test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ install-requirements:
77

88
. venv/bin/activate && sudo pipenv lock --requirements > requirements.txt
99
#. venv/bin/activate && sudo pip install --target ./lib -r requirements.txt
10-
. venv/bin/activate && sudo docker run -v $(PWD):/var/task "lambci/lambda:build-python3.11" /bin/sh -c "pip install --target ./lib -r requirements.txt; exit"
10+
. venv/bin/activate && sudo docker run -v $(PWD):/var/task "lambci/lambda:build-python3.9" /bin/sh -c "pip install --target ./lib -r requirements.txt; exit"
1111
sudo cp ../../terraform/modules/kafka-schema-registry/schemas/* ./lib/
1212
rm -rf venv/

lambdas/lambda_layers/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ ARG L_N
77
# Install system dependencies and zip
88
RUN apt-get update && \
99
apt-get upgrade -y && \
10-
apt-get install -y zip python3.11 python3-pip
10+
apt-get install -y zip python3.9 python3-pip
1111

1212
# Install pip
13-
RUN python3.11 -m pip install --upgrade pip
13+
RUN python3.9 -m pip install --upgrade pip
1414

1515
# Create a non-root user and group
1616
RUN addgroup --system docker_users \

terraform/core/13-mssql-ingestion.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ module "max_concurrency_lambda" {
190190
s3_key = "academy-revs-and-bens-housing-needs-database-ingestion-max-concurrency.zip"
191191
lambda_source_dir = "../../lambdas/calculate_max_concurrency"
192192
lambda_output_path = "../../lambdas/calculate_max_concurrency/max-concurrency.zip"
193-
runtime = "python3.11"
193+
runtime = "python3.9"
194194
}
195195

196196
resource "aws_iam_role" "academy_step_functions_role" {

terraform/core/22-sagemaker.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ resource "aws_lambda_function" "shutdown_notebooks" {
138138

139139
role = aws_iam_role.shutdown_notebooks[0].arn
140140
handler = "main.shutdown_notebooks"
141-
runtime = "python3.11"
141+
runtime = "python3.9"
142142
function_name = "${local.short_identifier_prefix}shutdown-notebooks"
143143
s3_bucket = module.lambda_artefact_storage.bucket_id
144144
s3_key = aws_s3_object.shutdown_notebooks.key

terraform/core/38-api-ingestion.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module "icaseworks_api_ingestion" {
1616
lambda_artefact_storage_bucket = module.lambda_artefact_storage.bucket_id
1717
lambda_name = "icaseworks-api-ingestion"
1818
lambda_handler = "main.lambda_handler"
19-
runtime_language = "python3.11"
19+
runtime_language = "python3.9"
2020
secrets_manager_kms_key = aws_kms_key.secrets_manager_key
2121
s3_target_bucket_arn = module.landing_zone.bucket_arn
2222
s3_target_bucket_name = local.s3_target_bucket_name
@@ -44,7 +44,7 @@ module "vonage_api_ingestion" {
4444
lambda_artefact_storage_bucket = module.lambda_artefact_storage.bucket_id
4545
lambda_name = "vonage-api-ingestion"
4646
lambda_handler = "main.lambda_handler"
47-
runtime_language = "python3.11"
47+
runtime_language = "python3.9"
4848
secrets_manager_kms_key = aws_kms_key.secrets_manager_key
4949
s3_target_bucket_arn = module.landing_zone.bucket_arn
5050
s3_target_bucket_name = local.s3_target_bucket_name

terraform/modules/api-ingestion-lambda/01-inputs-required.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ variable "runtime_language" {
6565
validation {
6666
condition = (
6767
contains([
68-
"python3.11",
68+
"python3.9",
6969
"nodejs14.x"
7070
], var.runtime_language)
7171
)
72-
error_message = "The value cannot be a blank string, and must be one of the following: 'python3.11' or 'nodejs14.x'"
72+
error_message = "The value cannot be a blank string, and must be one of the following: 'python3.9' or 'nodejs14.x'"
7373
}
7474
}
7575

terraform/modules/api-ingestion-lambda/10-lambda.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data "aws_iam_policy_document" "lambda_assume_role" {
1313
}
1414

1515
locals {
16-
command = var.runtime_language == "python3.11" ? "make install-requirements" : (var.runtime_language == "nodejs14.x" ? "npm install" : 0)
16+
command = var.runtime_language == "python3.9" ? "make install-requirements" : (var.runtime_language == "nodejs14.x" ? "npm install" : 0)
1717
# This ensures that this data resource will not be evaluated until
1818
# after the null_resource has been created.
1919
lambda_exporter_id = null_resource.run_install_requirements.id

terraform/modules/aws-lambda-folder-ingestion/02-inputs-optional.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ variable "tags" {
1919
variable "runtime" {
2020
type = string
2121
description = "Runtime to use for the Lambda Function"
22-
default = "python3.11"
22+
default = "python3.9"
2323
validation {
24-
condition = contains(["python3.9", "python3.10", "python3.11"], var.runtime)
24+
condition = contains(["python3.9", "python3.10", "python3.9"], var.runtime)
2525
error_message = "Runtime must be a valid Python runtime"
2626
}
2727

terraform/modules/aws-lambda/02-inputs-optional.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variable "tags" {
1919
variable "runtime" {
2020
type = string
2121
description = "Runtime to use for the Lambda Function"
22-
default = "python3.11"
22+
default = "python3.9"
2323
validation {
2424
condition = can(regex("python3[.]([7-9]|10)", var.runtime))
2525
error_message = "Runtime must be a valid Python runtime"

0 commit comments

Comments
 (0)