It's a valid approach, but the most significant concern is the cold start time, as AWS needs to have longer initialisation times to set up the execution environment, load code, and initialise the Spring application context etc.
That said, AWS provides Lambda SnapStart, which can significantly reduce cold start times by creating a snapshot of the initialised execution environment. So, if, after weighing the trade-offs, you decide to use Spring with Lambda, give SnapStart a try.