From 34efee93d8e874f0e44d54d354f80e5c20611ee4 Mon Sep 17 00:00:00 2001 From: threnjen Date: Thu, 19 Dec 2024 11:44:41 -0800 Subject: [PATCH] updates to task startup for rag --- aws_terraform_bgg/fargate_task_defs_rag.tf | 6 ++---- .../rag_description_generation_fargate_trigger.py | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/aws_terraform_bgg/fargate_task_defs_rag.tf b/aws_terraform_bgg/fargate_task_defs_rag.tf index 3585f78..af2a766 100644 --- a/aws_terraform_bgg/fargate_task_defs_rag.tf +++ b/aws_terraform_bgg/fargate_task_defs_rag.tf @@ -6,7 +6,6 @@ resource "aws_ecs_task_definition" "weaviate_rag_generation" { name = var.rag_description_generation, image = "${data.aws_caller_identity.current.account_id}.dkr.ecr.${var.REGION}.amazonaws.com/${var.rag_description_generation}:latest" cpu = 0, - memory=2048, essential = true, environment = [ { @@ -47,7 +46,6 @@ resource "aws_ecs_task_definition" "weaviate_rag_generation" { name = var.weaviate_rag_server, image = "${data.aws_caller_identity.current.account_id}.dkr.ecr.${var.REGION}.amazonaws.com/${var.weaviate_rag_server}:latest" cpu = 0, - memory = 4096, portMappings = [ { containerPort = 8080, @@ -141,8 +139,8 @@ resource "aws_ecs_task_definition" "weaviate_rag_generation" { network_mode = "awsvpc" requires_compatibilities = ["FARGATE"] - cpu = "1024" - memory = "8092" + cpu = "2048" + memory = "8192" runtime_platform { cpu_architecture = "X86_64" diff --git a/modules/lambda_functions/rag_description_generation_fargate_trigger.py b/modules/lambda_functions/rag_description_generation_fargate_trigger.py index 217b977..037826a 100644 --- a/modules/lambda_functions/rag_description_generation_fargate_trigger.py +++ b/modules/lambda_functions/rag_description_generation_fargate_trigger.py @@ -45,9 +45,8 @@ def lambda_handler(event, context): terraform_state_file = get_terraform_state_file() - task_definition = ( - f"dev_{TASK_DEFINITION}" if ENVIRONMENT != "prod" else TASK_DEFINITION - ) + task_definition = TASK_DEFINITION + print(task_definition) ecs_client = boto3.client("ecs")