Moses was born into a terrible situation. We may think we were born into unfortunate circumstances, but our situations pale in comparison to Moses' start. However, he had one thing going for him humanly: his parents, Amram and Jochebed.
Moses, of course, was unaware of these things, but God supplied the saving grace in the form of Amram and Jochebed. The Exodus account focuses on the part of Jochebed because it was she, undoubtedly, along with Miriam, who actually carried out the casting of Moses on the Nile. Hebrews 11:23, though, uses the term "parents," so that we understand that Amram was also involved—with his faith.
Notice that they were not afraid of the king's command. The Bible does not say what strengthened their faith, but they did a pretty dangerous thing. They put their lives on the line, as well as Moses' life, by putting him out on the water. Did God speak to them in a dream? Did God give them a vision? Did God send an angel? Or did they rely on the promise given to Abraham, knowing that they were coming to the end of an age? We cannot know because God does not say.
Whatever it was, in a way it does not matter. All that matters is that, somehow, they believed it and followed through by doing this thing that, at least on the surface, appears to have been very risky. Were they convicted that what they were doing was right? Certainly! Even the power of Egypt could not turn them aside from their conviction. Even the fear or the threat of losing their lives could not dissuade them. They did not have a preference—they were convicted! They put their lives, and their son's life, on the line because they trusted the word of their God.