Skip to content

Instantly share code, notes, and snippets.

@gungoren
Created January 23, 2023 14:47
Show Gist options
  • Save gungoren/ee1c926a686bc2430c464711bb7116da to your computer and use it in GitHub Desktop.
Save gungoren/ee1c926a686bc2430c464711bb7116da to your computer and use it in GitHub Desktop.
resource "aws_lambda_function" "search_function" {
function_name = "personnel-recognition-searcher"
role = aws_iam_role.search_function.arn
publish = true
runtime = "python3.8"
handler = "search_function.lambda_handler"
memory_size = 512
timeout = 60
filename = data.archive_file.search_function.output_path
source_code_hash = data.archive_file.search_function.output_base64sha256
environment {
variables = {
MAX_FACES_COUNT = var.max_faces_count
FACE_DETECT_THRESHOLD = var.face_detect_threshold
COLLECTION_ID = var.collection_id
TABLE_ID = local.table_name
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment