How to get 3 month old to sleep in crib???

So my son sleeps in our bed every night in between us in his Boppy pillow. Every time we try to put him in the crib he screams and cries. We let him cry it out one night for almost an hour straight when I went to go finally check on him he was sweating so much. I felt so bad. He will also sleep in his swing for a long time but I feel like a bad parent if I leave him in it for hours. I haven't had my bed to myself since he was born. What can I do??? (When I mean he hates his crib I mean the second he goes in he throws and huge fit)