In AWS you can easily create a RESTful API using API Gateway. With a serverless approach, you would have API Gateway integrate with Lambda to handle your endpoint logic. This seems like the most obvious approach, as its very elastic and cost effective, however, looking into architectures for large companies, most of them use a form of EC2 to handle their API logic.
Here are some examples:
- McDonald's uses ECS instead of Lambda for their API.
- Under Armor, uses an Application Load Balancer with EC2.
What is the benefit of using EC2 for your API instead of Lambda?