When is Oban preferred over AWS Lambda?

A lot of fine thought here, me personally it’s because:

  1. Simplicity, if you only care about doing basic async processing, elixir / BEAM it self already has tools to do it easily, such as supervised task or process.
  2. For more durable / consistent job, using a dedicated job queue library give better control over retry behavior, uniqueness consideration, worker, etc. over using AWS Lambda + SQS
  3. Avoid vendor lock-in.
  4. Transactional outbox pattern (sending message as part of transaction) could be performed more safely on Oban (rather to SQS directly), because Oban is based on postgres, it could get transactional guarantee of postgres.

That being said, i would probably go with AWS lambda if work i do is:

  1. Pretty complex / hard to do in elixir, enough to justify writing it on another language.
  2. Needing good integration to the rest of AWS ecosystem, such like: Cognito Post-sign up integration, API gateway integration, etc.