Host your frontend on S3 + CloudFront since it's static files.
For database calls, deploy your backend API in Lambda and connect it to your database. Embed the Lambda API endpoints in your frontend code.
Here's what happens:
- CloudFront serves your static frontend
- Lambda handles your database calls (dynamic operations)