Ashley, 20, won a contract after extended trials this preseason.
Ashley said: “This is probably the biggest step in my career so far and I'm excited to get started.
“Since my first day everyone has made me feel really welcome. They're all hard working and very professional, so it's easy to get along with them and learn from them.
“I'd describe myself as energetic, physical, and a box-to-box midfielder. I like to try and do it all!
“As everyone knows, West Ham are one of the biggest clubs in the country, with great fans and great facilities, and I feel like this is a Club where I can really develop as a player with the calibre of coaching staff and players around me."
Under-23s lead coach Dmitri Halajko added: “Ossama has been a really combative central midfielder for us since initially joining on trial.
“He goes box to box, he's really athletic and he can get up and down the pitch. He likes to win tackles and win second balls, but he also can pass the ball out nicely.
“He's got forward and broke into the box on a number of occasions, so I think he's exactly the kind of midfielder that West Ham likes to produce and has produced before.
“His first challenge will be to get into the Under-23s team. There's lots of competition for places, which is a positive thing, so that will be his first challenge, and then he'll want to improve and progress with the ultimate goal of going to try and get into first-team football."