Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] report lamba memory issue #259

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/backend/src/lambdas/reconcile.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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'
);

Expand Down
2 changes: 1 addition & 1 deletion terraform/lambda_reporting.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading