Hi Michal,
Correct, AWS EC2 is not at all the same thing as Firebase. AWS EC2 is a server instance where you can run server code. Firebase is a suite of pre-built cloud services that help developers offload maintenance, development and speed up development.
In your situation, if you are looking for a free or low cost option, where you can integrate many of the different types of services you have mentioned (authentication, storage, chatting, etc), Firebase is your best bet for the lowest effort.
If you go with AWS, you will end up needing much more than just EC2 to build and run your backend. More over, you will have to learn AWS's console which isn't the greatest user experience.
Beware that Firebase has a tendency not to be very reliable compared to AWS.
