Skip to content

Fix Lambda deployment, IAM permissions, and frontend crash #29

Merged
TimPolk merged 4 commits intomainfrom
Fix/deployment
Apr 1, 2026
Merged

Fix Lambda deployment, IAM permissions, and frontend crash #29
TimPolk merged 4 commits intomainfrom
Fix/deployment

Conversation

@YounBrand
Copy link
Copy Markdown
Collaborator

@YounBrand YounBrand commented Mar 30, 2026

Lambda OOM
128MB was insufficient for a Fastify app with a native addon. Increased to 512MB in both Terraform and the live function.

  • Fix crash on Dashboard, Budget, and Bank Link pages when budget categories are undefined — all .amount accesses now use optional chaining (?.amount ?? 0) to handle users with partially set budgets

  • Fix test suite: use port 8001 for test DynamoDB container to isolate it from the dev instance, resolving InternalFailure on table creation caused by case-insensitive name conflict with existing users tabl

    Changes

    • terraform/lambda.tf — fix IAM policy with correct table names, all tables, and DeleteItem; remove stale AGENT_SERVICE_URL env var; add memory_size = 512; add aws_caller_identity data source
    • client/src/pages/LinkBankPage.tsx — guard undefined budget fields in reduce and render
    • server/package.json — remove unused bcryptjs and @types/bcryptjs

    Manual AWS changes applied outside this PR

    • IAM policy on financial-assistant-api-role updated with correct table names and all tables
    • Proposals DynamoDB table created
    • AGENT_SERVICE_URL removed from Lambda environment variables

@TimPolk TimPolk merged commit 2688aac into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants