Skip to content

Commit

Permalink
Remove concurrency on Lambda (was useful when Lambda were triggered v…
Browse files Browse the repository at this point in the history
…ia Cloudwatch log subscriptions, not Step Functions)
  • Loading branch information
psantus committed Jan 4, 2025
1 parent f849d71 commit 662f03c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module "ja3fingerprint_blacklist" {
threshold_alarm = 30 // As soon as this threshold is crossed, we'll trigger the workflow
threshold_per_ja3 = 10 // Ja3Finder uses this to block only Ja3FingerPrints that were blocked multiple times.
log_group_name = "aws-waf-logs-myacl" // name of the log group which ja3Finder will query
lambda_concurrency = 1 // Prevents 429s fur WAFv2 APIs. See WAF quotas for limit
rule_group_scope = "CLOUDFRONT"
rule_group_maxsize = 30 // WAF consumed capacity will be 3x that amount.
ja3_ban_duration_in_seconds = 3600 // How long before we unban Ja3FingerPrints
Expand Down
2 changes: 0 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ resource "aws_lambda_function" "ja3_finder" {
runtime = "python3.12"
handler = "ja3Finder.lambda_handler"
timeout = 240
reserved_concurrent_executions = var.lambda_concurrency

environment {
variables = {
Expand All @@ -62,7 +61,6 @@ resource "aws_lambda_function" "ja3_rulegroup_updater" {
runtime = "python3.12"
handler = "ja3RuleGroupUpdater.lambda_handler"
timeout = 60
reserved_concurrent_executions = var.lambda_concurrency

environment {
variables = {
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,4 @@ variable "sampled_requests_enabled" {
type = bool
description = "Whether to enable sampled requests logging"
default = false
}

variable "lambda_concurrency" {
type = number
description = "The amount of reserved concurrency for the Lambda function. If you don't set this you might hit throttling errors on WAF GetRuleGroup API "
default = -1
}

0 comments on commit 662f03c

Please sign in to comment.