A Cost-Conscious AWS Architecture for a Startup Web App
CloudFront serves a private S3 frontend over HTTPS beside a pay-per-use API Gateway, Lambda, and DynamoDB backend.
Explore diagramOpen editable diagramExplore on mobile. Create and edit manually or with AI on a computer.
Architecture diagram
Explore diagramEdit this exact diagram
Explore diagramOpen on the canvasCost-conscious AWS web app diagram with CloudFront serving private S3 assets and a separate browser path through API Gateway, Lambda, and DynamoDB. Open the image to explore this ready-made diagram.The image links to a fully editable BuildPlane starter.
Overview
CloudFront serves the static frontend over HTTPS from a private Amazon S3 origin. The browser calls Amazon API Gateway separately for backend operations. AWS Lambda runs application logic only when invoked, and DynamoDB stores data with on-demand capacity, keeping idle application-compute cost low.
Components
- CloudFront and Private S3: CloudFront caches the frontend and uses origin access control to retrieve assets from a private S3 REST origin.
- API Gateway: Publishes managed HTTPS routes and scales without reserved application capacity.
- Lambda and DynamoDB: Run product logic and store records with pay-per-request starting points.
Application Flow
- A browser loads the frontend over HTTPS from CloudFront, which retrieves uncached assets from the private S3 origin.
- The frontend sends dynamic requests to API Gateway.
- API Gateway invokes the Lambda function for product operations.
- Lambda reads and writes product records in the on-demand DynamoDB table.
Customize First
- Set budgets and billing alarms before inviting users.
- Tune CloudFront cache policies and restrict the S3 bucket policy to the intended distribution.
- Add authentication when the product begins storing user-specific data.
- Revisit reserved capacity after traffic becomes predictable enough to justify it.
Related AWS guides
Understand the decisions behind this diagram
Use these practical explanations to compare services, failure boundaries, and operating tradeoffs before adapting the architecture.
Cost Optimization
How to Reduce EC2 Costs Without Making Production Fragile
The biggest EC2 savings rarely come from one discount. They come from removing idle capacity, matching commitments to a stable baseline, and scaling the rest safely.
Read the guideAWS Certification
AWS Cloud Practitioner Study Guide: A Practical 30-Day Plan
Cloud Practitioner is easier when services form a mental map. This four-week plan combines the official exam domains, small labs, diagrams, and scenario practice.
Read the guideAWS Fundamentals
How to Host a Static Website on Amazon S3 Without Buying a Domain
A small demo, event flyer, or portfolio page can start with an AWS-provided URL. Here is the quick S3 path and the security boundary to understand first.
Read the guideDesign rationale
Decisions that shape this architecture
Avoid paying for idle application servers
API Gateway and Lambda charge mainly when requests arrive. This is attractive before traffic becomes stable enough to justify reserved compute.
Separate the static frontend from the API
CloudFront serves the built application from S3 using origin access control, while browser API calls follow their own API Gateway path. Frontend delivery and backend scaling can change independently.
Delay capacity commitments
DynamoDB on-demand capacity is simple during uncertain growth. Revisit provisioned or reserved pricing after usage becomes predictable.
Before production
Operational checks
Create AWS Budgets and billing alarms before inviting users.
Set concurrency, API throttling, and data-retention limits to bound surprise spend.
Track cost per request and cost per active user as the product grows.
Review CloudWatch log retention because verbose logs can become a material cost.
Scope and tradeoffs
What this diagram does not solve
Low idle cost is not always the lowest unit cost
At sustained high volume, containers, reserved compute, or provisioned database capacity may deliver a lower cost per request.
The minimal version omits several launch controls
Add authentication, backups, alarms, least-privilege IAM, and deployment automation according to the product risk. Configure CloudFront origin access control and S3 Block Public Access so the asset bucket stays private.
Common questions
Frequently asked questions
Why is serverless attractive for a startup?
It reduces server operations and idle compute cost while traffic is small or unpredictable, letting the team defer capacity planning.
Is S3 website hosting enough for production?
This starter uses CloudFront with a private S3 REST origin for HTTPS delivery and origin access control. It does not expose the S3 website endpoint directly.
When should the architecture move away from on-demand pricing?
Review alternatives when traffic and storage patterns are stable enough to compare reserved or provisioned options with the operational cost of changing them.
Keep exploring
Related AWS architectures

Serverless REST API Architecture on AWS
This is the serverless API baseline that most production APIs grow from rather than away from: a managed HTTPS entry point, stateless function compute, on-demand data storage, and observable execution. It is deliberately compact so the first real decisions stay legible. Adding authentication, caching, asynchronous work, and a second Region each attaches to this shape without replacing it, which is why it is worth understanding before the additions arrive.
Explore the architecture
Serverless Multi-Tenant SaaS Architecture on AWS
This architecture combines a protected synchronous API with a durable asynchronous work path. Tenant identity travels from Cognito into application authorization, domain events decouple background work, and DynamoDB plus S3 provide scalable tenant state and assets.
Explore the architecture
Containerized Web Service with Amazon ECS and Fargate
This architecture shows the running service: a protected global edge, a Multi-AZ load balancer, private Fargate tasks, and managed data services. It is a useful starting point for teams outgrowing a single server or a function-based API; deployment, credential delivery, and monitoring can be added around that request path.
Explore the architectureReady-made AWS diagramFrom reference to working draft
Explore this AWS architectureAdapt this architecture with your AWS AI Agent
Open the diagram from this guide and explore how it works. Create and edit manually or with AI on a computer.Start from the exact diagram in this guide. Change requirements, challenge a decision, or ask what fails first, while keeping the architecture editable.