Can a lambda be deployed on two gateway

I want to deploy the same lambda on two gateway(one is public, one is private). Is this possible?