Example Spark streaming sample codes with Custom Listeners to push streaming metrics into Amazon CloudWatch metrics
https://aws.amazon.com/blogs/big-data/monitor-spark-streaming-applications-on-amazon-emr/
Repository from Github https://github.comawslabs/aws-cloudwatch-metrics-custom-spark-listener