diff --git a/apps/backend/src/lambdas/reconcile.ts b/apps/backend/src/lambdas/reconcile.ts index e06f5e3a..3be2464c 100644 --- a/apps/backend/src/lambdas/reconcile.ts +++ b/apps/backend/src/lambdas/reconcile.ts @@ -1,7 +1,7 @@ import { NestFactory } from '@nestjs/core'; import { Context } from 'aws-lambda'; import { SNSEvent } from 'aws-lambda/trigger/sns'; -import { format, parse, subBusinessDays } from 'date-fns'; +import { format, parse, subBusinessDays, subDays } from 'date-fns'; import { generateLocalSNSMessage } from './helpers'; import { handler as reportHandler } from './report'; import { AppModule } from '../app.module'; @@ -51,7 +51,7 @@ export const handler = async (event: SNSEvent, _context?: Context) => { const currentDate = parse(reconciliationMaxDate, 'yyyy-MM-dd', new Date()); const reconciliationMinDate = format( - subBusinessDays(currentDate, numDaysToReconcile), + subDays(currentDate, numDaysToReconcile), 'yyyy-MM-dd' ); diff --git a/terraform/lambda_reporting.tf b/terraform/lambda_reporting.tf index c2f4b004..a9c74dda 100644 --- a/terraform/lambda_reporting.tf +++ b/terraform/lambda_reporting.tf @@ -6,7 +6,7 @@ resource "aws_lambda_function" "reports" { filename = "build/empty_lambda.zip" source_code_hash = filebase64sha256("build/empty_lambda.zip") handler = "src/lambdas/report.handler" - memory_size = 1024 + memory_size = 1536 timeout = 600 reserved_concurrent_executions = 1