45 and 46/1000 — Cron execution

logscript-cron
Back

This update covers two days of work, partially because I don't feel the need to Tweet an update with the state of the world at this moment.

45/1000 DynamoDB + Serverless

I was able to process a cron job from end to end finally.

Half of the battle was sharing a table between various serverless functions. It turns out that the easiest way is to use CloudFormation variables.

Outputs:
scheduleTableArn:
Value:
Fn::GetAtt:
- ScheduleTable
- Arn
Export:
Name: scheduleTableArn
cronTableArn:
Value:
Fn::GetAtt:
- CronTable
- Arn
Export:
Name: cronTableArn

Then after exporting, consuming them in the other serverless.yml files

Resource:
- ${cf:cron-scheduler-${self:provider.stage}.scheduleTableArn}

46/1000 Cron E2E

After that, I figured out cron job execution from end-to-end.

At the moment, I've included a limited scope for the MVP:

Victory.

Subscribe to 3-2-1 Tech

Get weekly emails from me with 3 tips for your side projects, 2 web dev articles, and 1 project update.

Read the latest issue
© Drew Bredvick.RSS