What's the best way to invoke another function? (or get it's ARN)
reccomend using @events
or @queues
for 'background tasks' (events are SNS topics, unordered ans async…queues are SQS fifo queues)
is it safe to put
await arc.tables()
outside the event handler of a function?
you can, it will make a one time call to SSM to resolve generated table names with the names defined .arc
but generally I'd reccomend keeping things deterministic as possible and doing it in the main function body
how does specifying a ddb trigger look?
define it in your .arc
@app
myapp
@tables
cats
catID *String
stream true
And src/tables/cats/index.js
will be invoked whenever a write happens (but not locally / unfortunately dynalite doesn't support his yet)
changed my global runtime and it doesn't seem to hit the ws functions
yeah it will only take effect on new functions. you can change function runtimes in src/**/*/.arc-config
… the default is nodejs12.x