For spark streaming there are connectors <https://github.com/imapi/spark-sqs-receiver> that can achieve this functionality.
Unfortunately for spark structured streaming I couldn't find any as it's a newer technology. Is there a way to connect to a source using a spark streaming connector? Or is there a way to create a custom connector similar to the way one can be created in a spark streaming <http://spark.apache.org/docs/latest/streaming-custom-receivers.html> application? Many thanks, Bogdan Cojocar