Skip to content

Commit

Permalink
#14 added logging capability
Browse files Browse the repository at this point in the history
  • Loading branch information
kunduso committed Jun 12, 2024
1 parent 3f1b3b6 commit 5d83bcd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ data "archive_file" "python_file" {
}

resource "aws_lambda_function" "lambda_run" {
filename = "${path.module}/lambda_function/lambda_function.zip"
function_name = "write_parameter_to_cloudwatch"
role = aws_iam_role.lambda_role.arn
handler = "handler.lambda_handler"
runtime = "python3.8"
filename = "${path.module}/lambda_function/lambda_function.zip"
source_code_hash = data.archive_file.python_file.output_base64sha256
function_name = var.name
role = aws_iam_role.lambda_role.arn
handler = "handler.lambda_handler"
runtime = "python3.8"
logging_config {
log_format = "JSON"
log_group = aws_cloudwatch_log_group.lambda_log.name
system_log_level = "INFO"
}
}

resource "aws_cloudwatch_event_rule" "lambda_trigger" {
Expand Down

0 comments on commit 5d83bcd

Please sign in to comment.