Well, you *can* build pretty much everything yourself in EC2 (VMs) or Containers. But the recommended approach (more scalable, secure, cost effective) is to use the various managed services: API Gateway, Dynamo, Cognito, Compute engine (Lambda) and what not.
Don't really know your exact requirement though. The above is the "generic" advice.. 😉