6

Reading the AppSync documentation, it seems that AppSync Subscriptions only work by attaching a subscription to a mutation.

But what if I need a subscription that is independent of a mutation? That is fired on some internal state change? For example if a new resource is available?

Is that possible in AppSync?

Nathan
  • 7,099
  • 14
  • 61
  • 125

1 Answers1

5

This is not possible without mutations. I had the same problem months ago and my solution was to create a mutation with None Data Source just to trigger the subscription. This way every time an event was triggered, my Lambda calls the none mutation.

Pedro Arantes
  • 5,113
  • 5
  • 25
  • 60