This is a bad design, why use the same lambda to poll different queues?
There is no cost when the lambda is not running, why not create separate lambdas for queue A and queue B