architect/functions

event.publish in Architect v5 mode needs to paginate sns.listTopics

ryanblock opened this issue · 1 comments

Describe the issue
Architect v5 projects using arc.events.publish may unexpectedly fail in the following conditions:

  • A function fires a number of publish events in parallel (say, 5)
  • The app's SNS has a few hundred events (say, 200-300)

In this block events.publish loops through all topics until it finds what it's looking for, then fires the event; however, by default SNS listTopics can only run 30tps, so enough loops through at the same time and your function will unexpectedly error.

Fixed, dupe issue #300