Building with AWS
Already invested in AWS AWS (Amazon Web Services) Amazon's massive cloud computing platform. Offers everything from simple hosting to databases, AI, and more. Powers half the internet. "Like a giant LEGO set for the cloud. Hundreds of services you can combine to build anything."
1AWS vs Vibe Stack: When to Choose What
AWS is a hardware store with every tool ever made. The Vibe Stack is a pre-assembled workbench. Both build real things; one asks you to pick every screw.
Choose AWS If...
- Your company already runs on AWS (accounts, billing, security reviews)
- You need custom networking: VPCs, private subnets, peering
- Your data must stay in a specific AWS region or account for compliance
- You need services the Vibe Stack doesn't have (queues at huge scale, data lakes, IoT)
- Your team has AWS or infrastructure-as-code experience
Choose Vibe Stack If...
- You want to ship this week with minimal config
- You're building a web app, API, or AI feature
- You want preview deployments on every PR out of the box
- You're a solo developer or small team without DevOps help
- You'd rather scale to zero than pay for idle servers
2Recommended AWS Stack for Web Apps
AWS AmplifyAWS Amplify
Amazon's platform for building and deploying full-stack web and mobile apps. The current generation (Gen 2) is code-first: you define both frontend and backend in TypeScript, and it wires up AWS services like Cognito and DynamoDB for you.
"Like Vercel, but built by Amazon for the AWS family. If you're in AWS, it's a natural fit."
Gen 2 (Hosting + Backend)
AWS Amplify
Amazon's platform for building and deploying full-stack web and mobile apps. The current generation (Gen 2) is code-first: you define both frontend and backend in TypeScript, and it wires up AWS services like Cognito and DynamoDB for you.
"Like Vercel, but built by Amazon for the AWS family. If you're in AWS, it's a natural fit."
Git-based hosting for Next.js and React, plus a code-first backend
Why Use It
- • Git-based deploys and branch previews (like Vercel)
- • Gen 2 is code-first: backend defined in TypeScript, not console clicks
- • Auth, data, and storage wired to real AWS services
- • Per-developer cloud sandboxes for testing backend changes
- • Custom domains with SSL
Gotchas
- • Newest Next.js features can lag behind Vercel
- • Old tutorials describe Gen 1 (CLI + console), which works differently
- • You're still debugging AWS underneath when things break
Comparable to: Vercel for hosting, Supabase or Firebase for the backend pieces. Start a Gen 2 project from the templates in the Amplify docs so you get the current setup command.
Amazon RDSAWS RDS (Relational Database Service)
Amazon's managed database service supporting PostgreSQL, MySQL, MariaDB, and more. Handles backups, updates, and scaling. Great for production workloads in AWS.
"Like hiring a database administrator who works 24/7. You use the database; AWS handles the maintenance."
/ Aurora (Database)
AWS RDS (Relational Database Service)
Amazon's managed database service supporting PostgreSQL, MySQL, MariaDB, and more. Handles backups, updates, and scaling. Great for production workloads in AWS.
"Like hiring a database administrator who works 24/7. You use the database; AWS handles the maintenance."
Managed PostgreSQL PostgreSQL A powerful, open-source relational database. Rock-solid, feature-rich, and the choice for serious production apps. "Like the Toyota Camry of databases. Reliable, well-documented, handles anything you throw at it."
Why Use It
- • Automatic backups and point-in-time recovery
- • Multi-AZ high availability and read replicas
- • Private networking inside your VPC
- • Lives next to the rest of your AWS data
Gotchas
- • A classic instance bills every hour it runs, used or not
- • VPC and security-group setup before you connect
- • Serverless functions need pooling (RDS Proxy) to avoid connection storms
- • No Neon-style instant branching for dev environments
Comparable to: Neon or Supabase, without scale-to-zero branching by default. See Databases for the side-by-side.
AWS LambdaAWS Lambda
Amazon's serverless compute service. Run code in response to events without managing servers. Pay only when your code runs. The original serverless platform.
"Like a vending machine for code. Insert event, get result, pay per use."
(Backend / Events)
AWS Lambda
Amazon's serverless compute service. Run code in response to events without managing servers. Pay only when your code runs. The original serverless platform.
"Like a vending machine for code. Insert event, get result, pay per use."
Serverless Serverless A cloud model where you don't manage servers: your code runs in response to requests or events, scales automatically, and you pay for usage. Modern platforms like Vercel's Fluid Compute reuse warm instances for many requests at once and bill for active CPU time, which makes serverless a much better fit for slow AI calls. "Like renting a kitchen by the meal instead of buying a restaurant. Use it, pay for it, done."
Why Use It
- • Pay per use, no servers to manage
- • Triggered by almost any AWS event (uploads, queues, schedules)
- • Scales automatically
- • Many languages, including Node.js and Python
Gotchas
- • Cold starts on idle functions
- • Execution-time and payload limits (check current quotas)
- • HTTP APIs need extra wiring (API Gateway or function URLs)
- • Local testing takes extra tooling
Comparable to: Vercel Functions, which run on Fluid Compute Fluid Compute Vercel's default function runtime model (on for new projects since April 2025). Instead of one request per function instance, an instance can handle many requests at once, keep working after the response with `waitUntil`, and you're billed for active CPU time rather than time spent waiting on things like AI responses. "Like a waiter who serves several tables at once instead of standing idle while one table's food cooks."
Amazon Cognito (Authentication)
User sign-up, sign-in, and tokens
Why Use It
- • User pools with email/password and social logins
- • MFA support
- • JWTsthat other AWS services understand
JWT (JSON Web Token)
A compact, secure way to transmit information between parties. Often used for authentication tokens after login.
"Like a tamper-proof wristband at a concert. Shows you're allowed in without checking the list every time."
- • Amplify Gen 2 auth is built on it
Gotchas
- • IAM roles and settings are easy to misconfigure
- • Hosted UI customization is limited
- • Migrating users out later is painful
Comparable to: Clerk, Auth0, Better Auth, or Supabase Auth. See Auth for how they compare.
3The Free Tier & What Actually Costs Money
The AWS free tier is now credit-based. New accounts get $100 in credits at signup, plus up to $100 more as you explore services: up to $200 over 6 months.
Credits
Spend them on almost anything while you learn. When they run out (or the 6 months end), you're on normal pay-as-you-go pricing.
Always-free services
30+ services keep a monthly free allowance after that. Check aws.amazon.com/free for which ones and how much.
Always-on resources
A classic RDS instance, NAT gateways, load balancers
Bill every hour, even at zero traffic. Usually the biggest line.
Pay-per-use resources
Lambda, API Gateway, S3, Cognito
Cheap or free at hobby scale; grows with traffic.
Sneaky extras
Data transfer out, CloudWatch logs, multi-AZ copies
Small individually, surprising together.
Compare honestly: The Vibe Stack's free tiers (Vercel Hobby, Neon Free with scale-to-zero) cover most side projects indefinitely. On AWS, price out your design in the AWS Pricing Calculator before you build, and set a budget alert on day one.
4Building AWS Apps with AI
Claude CodeClaude Code
Anthropic's agentic coding tool. It lives in your terminal (and in VS Code, JetBrains, and on the web), reads your codebase, edits files, runs commands, and ships code. Install with the native installer (`curl -fsSL https://claude.ai/install.sh | bash` on macOS/Linux, `irm https://claude.ai/install.ps1 | iex` on Windows); it needs a Pro, Max, Team, Enterprise, or Console account.
"Like having a senior developer living in your terminal, ready to help 24/7."
(Recommended)
Claude Code
Anthropic's agentic coding tool. It lives in your terminal (and in VS Code, JetBrains, and on the web), reads your codebase, edits files, runs commands, and ships code. Install with the native installer (`curl -fsSL https://claude.ai/install.sh | bash` on macOS/Linux, `irm https://claude.ai/install.ps1 | iex` on Windows); it needs a Pro, Max, Team, Enterprise, or Console account.
"Like having a senior developer living in your terminal, ready to help 24/7."
Claude Code is strong at AWS: the SDKs, CDK, CloudFormation, IAM policies, and reading the error messages that come back. It can run the AWS CLI for you in your terminal, so it can inspect real resources instead of guessing.
Tip: Name the exact services and regions you want ("Lambda behind API Gateway in us-east-1, Postgres on RDS"). AWS has hundreds of services and clarity prevents creative detours. Keep it in plan mode before anything that creates or deletes resources.
Company requires AWS billing? Claude Code can run through Amazon Bedrock with your AWS credentials. Run claude, choose the 3rd-party platform option, then Amazon Bedrock, or set it manually:
Terminal
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1 # optional if your AWS profile sets a region
claudeDetails and required IAM permissions: Claude Code on Amazon Bedrock.
AWS's own AI coding tools
Amazon offers its own AI coding assistants and an agentic IDE, plus AI help inside the AWS Console. They're tuned for AWS services and best practices, and they're a natural fit if your organization already standardizes on AWS tooling. Product names and plans change often, so check AWS's current developer-tools page rather than trusting a blog post (or an AI's memory).
Other AI tools
Cursor, GitHub Copilot, and Gemini-based tools all know AWS basics. Whatever you use, the risk is the same: models trained on old docs suggest deprecated patterns. Paste in current docs or connect a docs server via MCP when accuracy matters.
5Quick Start: Host a Next.js App on Amplify
Create an AWS account and lock it down
Sign up at aws.amazon.com and claim the new-account credits. Turn on MFA for the root user, create a separate day-to-day user or SSO login, and set a budget alert before anything else.
Push your app to Git
Amplify deploys from Git providers such as GitHub, GitLab, and Bitbucket. Make sure your Next.js app builds locally with npm run build first.
Open Amplify in the AWS Console
Search for "Amplify", choose to deploy an app, and connect your Git provider.
Pick the repo and branch
Amplify detects Next.js and proposes build settings. Add your environment variables (DATABASE_URL, API keys) here, not in the code.
Deploy
Save and deploy. Every push to that branch redeploys, and you can turn on previews for pull requests.
Live! Your app gets an amplifyapp.com URL; add a custom domain in the Amplify settings. Want auth or a database managed by Amplify too? Add a Gen 2 backend following the Amplify docs' Next.js quickstart. Before real users arrive, run through the deployment checklist.
6Common AWS Gotchas
IAM permissions hell
IAM (Identity and Access Management) controls who can do what. It's powerful and confusing, and you will meet "AccessDenied" often. The tempting fix (give everything admin) is how accounts get breached.
Fix: Use AWS-managed policies to start, then tighten. Paste the exact error into Claude and ask for the minimal policy that allows that one action. Never commit access keys; prefer SSO or short-lived credentials.
VPC networking complexity
RDS lives inside a VPC. Getting Lambda (or your laptop) to reach it means subnets, security groups, and sometimes a NAT gateway, which is an always-on cost.
Fix: Use RDS Proxy for serverless callers, or consider Aurora Serverless. Or skip the VPC work entirely with Neon or Supabase over a pooled connection.
Lambda cold starts
Functions that haven't run recently take extra time to start, which can make an API feel sluggish, especially with large bundles or VPC access.
Fix: Keep bundles small, pay for provisioned concurrency on hot paths, or host the API on Vercel Functions where Fluid Compute reuses warm instances across requests.
Surprise bills
Forgotten test databases, NAT gateways, data transfer, and verbose logs keep billing quietly. Credits hide this for a few months, then the real bill arrives.
Fix: Set AWS Budgets alerts immediately. Review Cost Explorer weekly while learning. Tag resources per project and delete what you're not using. Infrastructure as code (CDK, or Amplify Gen 2) makes teardown one command instead of an archaeology dig.
Ready to build on AWS?
AWS is powerful. Just make sure it's the right fit, and compare with Google Cloud before you commit.