Skip to content

Commit

Permalink
Merge pull request #59 from kookmin-sw/jihun
Browse files Browse the repository at this point in the history
serverless inference iac code 수정
  • Loading branch information
jhM00n authored May 11, 2024
2 parents ae00dd4 + 13c7035 commit 22748d6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
8 changes: 4 additions & 4 deletions IaC/serverless_api_template/var.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ variable "db_api_url" {
}

variable "karpenter_node_iam_node_name" {
type = string
type = string
default = ""
}

variable "model_s3_url" {
variable "region_name" {
type = string
default = ""
}

variable "region_name" {
type = string
variable "model_s3_url" {
type = string
default = ""
}

Expand Down
5 changes: 5 additions & 0 deletions IaC/serverless_inference/lambda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ resource "aws_lambda_function" "lambda" {
timeout = 120
role = aws_iam_role.lambda-role.arn

environment {
variables = {
MODEL_S3_URL = var.model_s3_url
}
}
}

resource "aws_cloudwatch_log_group" "lambda-cloudwath-log-group" {
Expand Down
1 change: 1 addition & 0 deletions IaC/serverless_inference/lambda/var.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ variable "container_registry" {}
variable "container_repository" {}
variable "container_image_tag" {}
variable "ram_mib" {}
variable "model_s3_url" {}
11 changes: 6 additions & 5 deletions IaC/serverless_inference/lambdas.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module "lambda" {
source = "./lambda"
prefix = var.prefix
container_registry = var.container_registry
source = "./lambda"
prefix = var.prefix
container_registry = var.container_registry
container_repository = var.container_repository
container_image_tag = var.container_image_tag
ram_mib = var.lambda_ram_size
container_image_tag = var.container_image_tag
ram_mib = var.lambda_ram_size
model_s3_url = var.model_s3_url
}
5 changes: 5 additions & 0 deletions IaC/serverless_inference/var.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ variable "lambda_ram_size" {
type = number
default = 4096
}

variable "model_s3_url" {
type = string
default = ""
}

0 comments on commit 22748d6

Please sign in to comment.