Skip to content

Polish repo for attractiveness and add cost-optimization improvements#6

Merged
tukue merged 2 commits into
mainfrom
feature/repo-polish-cost-optimization
May 26, 2026
Merged

Polish repo for attractiveness and add cost-optimization improvements#6
tukue merged 2 commits into
mainfrom
feature/repo-polish-cost-optimization

Conversation

@tukue

@tukue tukue commented May 26, 2026

Copy link
Copy Markdown
Owner
  • Add LICENSE (MIT), CONTRIBUTING.md, PR template, .editorconfig
  • Overhaul README with badges, config tables, policy matrix, project tree
  • Improve package.json with description, keywords, repo metadata
  • Conditional NAT Gateway (~2/mo saved) — deployed only when enrichment API CIDRs are configured
  • DynamoDB TTL on job records for auto-cleanup
  • Configurable Fargate CPU/memory and log retention periods
  • Add SQS VPC endpoint to reduce NAT dependency
  • Cover all new options in tests (20/20 passing)

- Add LICENSE (MIT), CONTRIBUTING.md, PR template, .editorconfig
- Overhaul README with badges, config tables, policy matrix, project tree
- Improve package.json with description, keywords, repo metadata
- Conditional NAT Gateway (~2/mo saved) — deployed only when enrichment API CIDRs are configured
- DynamoDB TTL on job records for auto-cleanup
- Configurable Fargate CPU/memory and log retention periods
- Add SQS VPC endpoint to reduce NAT dependency
- Cover all new options in tests (20/20 passing)

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds valuable cost optimization features (conditional NAT Gateway, DynamoDB TTL) and improved configurability (Fargate CPU/memory, log retention). The repository polish improvements are also excellent.

Critical Issue Found:

  • DynamoDB TTL is enabled but the Ttl attribute is never populated in job records, preventing auto-cleanup from working. The removed RetentionDays field must be replaced with proper Unix epoch timestamp calculation.

All other changes reviewed:

  • Conditional NAT Gateway logic is correct and will save ~$32/month when enrichment APIs aren't needed
  • SQS VPC endpoint addition is appropriate
  • Configurable Fargate resources and log retention work correctly
  • Helper functions in deployment-config.ts improve code quality
  • All security configurations remain properly enforced
  • Tests comprehensively cover new features (20/20 passing)

Once the TTL population issue is fixed, this PR will be ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: true,
},
timeToLiveAttribute: 'Ttl',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Logic Error: TTL attribute 'Ttl' enabled but never populated in DynamoDB items. The removed RetentionDays field from markJobStarted (deleted at old line 420) must be replaced with a Ttl attribute containing Unix epoch timestamp (current time + jobRetentionDays * 86400). Without this, job records will never auto-expire despite TTL being enabled.

@tukue tukue self-assigned this May 26, 2026
@tukue tukue added the enhancement New feature or request label May 26, 2026
The TTL attribute was enabled on the DynamoDB table but never written
into job records, preventing auto-cleanup. Add a small inline Lambda
that calculates current time + (jobRetentionDays * 86400) and invoke it
from the Step Functions workflow before the MarkJobStarted PutItem task.
@tukue tukue merged commit e8b92b3 into main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant