Skip to content

Commit

Permalink
fix: increase API function's ephemeral storage (#480)
Browse files Browse the repository at this point in the history
This will fix errors being raised by `freshclam` when it attempts to
update the virus definitions and a `.cdiff` patch file does not
exist.

Also removes the size debugging code from the API function code.
  • Loading branch information
patheard authored Dec 8, 2022
1 parent 14d06df commit c51e21f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
13 changes: 0 additions & 13 deletions api/clamav_scanner/clamav.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,6 @@ def update_defs_from_freshclam(path, library_path=""):
)
log.info("Starting freshclam with defs in %s." % path)

# Debug available space in directory
du_proc = subprocess.run(
[
"du",
"-h",
"%s" % AV_DEFINITION_PATH,
],
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
env=fc_env,
)
log.info("du output:: %s" % du_proc.stdout.decode("utf-8"))

fc_proc = subprocess.run(
[
FRESHCLAM_PATH,
Expand Down
3 changes: 2 additions & 1 deletion terragrunt/aws/api/lambda.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module "api" {
source = "github.com/cds-snc/terraform-modules?ref=v0.0.45//lambda"
source = "github.com/cds-snc/terraform-modules?ref=v5.0.0//lambda"
name = "${var.product_name}-api"
billing_tag_value = var.billing_code
ecr_arn = aws_ecr_repository.api.arn
enable_lambda_insights = true
image_uri = "${aws_ecr_repository.api.repository_url}:latest"
memory = 3008
timeout = 300
ephemeral_storage = 768

vpc = {
security_group_ids = [module.rds.proxy_security_group_id, aws_security_group.api.id]
Expand Down

0 comments on commit c51e21f

Please sign in to comment.