PCs are orders of magnitude more complex, with a lot more to break. Sounds like a whole lot of work for… what?
Assuming the internet connection and AWS work of course. Which they won’t always, then oops.
If you're relying on AWS you either way have a "PC" to relay communication between AWS and the keycard readers & door latches.
A large number of embedded micro controllers are just PCs running Yocto linux configured as GP said. You can save money with a $.05 micro controller, but in most cases the development costs to make that entire system work are more than just buying an off the shelf raspberry pi.