Lambda triggered by CloudWatch Event when SQS queue is empty/full

Could anybody share an example of a Lambda function configured to be triggered when an SQS queue becomes empty for say, 10 minutes, and when the queue is non-empty? I want to scale my DynamoDb table’s provisioned capacity units (I have a job that fills a queue once a day and once the queue is drained I don’t need write capacity until the job starts the next day).

Thanks in advance.