In the present work, we investigate \(P_c(4312)\), \(P_c(4440)\) and \(P_c(4457)\) production from \(\Lambda_b\) decay in a molecular scenario by using an effective Lagrangian approach. We predict the ratio of the branching fraction of \(\Lambda_b \to P_c K\), which is weakly dependent on our model parameter. We also find the ratios of the productions of the branching fractions of \(\Lambda_b \to P_c K\) and \(P_c \to J/\psi p\) can be well interpreted in the molecular scenario. Moreover, the estimated branching fractions of \(\Lambda_b \to P_c K\) are of order \(10^{-6}\), which could be tested by further measurements in LHCb Collaboration.