sam-goodwin / eventual

Build scalable and durable micro-services with APIs, Messaging and Workflows
https://docs.eventual.ai
MIT License
174 stars 4 forks source link

`service.commands.XYZ` should map to a `lambda.Function` but it doesn't #391

Closed sam-goodwin closed 1 year ago

sam-goodwin commented 1 year ago

service.commands.XYZ should map to a lambda.Function but it doesn't

image

thantos commented 1 year ago

The function is on service.commands.XYZ.handler. There is more to a command than just the lambda function. Right now the EventualResource which wraps the handler contains the logic for creating the dynamic principal when in local mode.

Other resources that use EventualResource: subscription, task, entity, bucket.

In the case of subscription, the exposed resource also contains the dead letter queue, it is not just a function.

A command may be the same in the future: handler, dynamic principal (local, etc), alarms, keys, etc.