Cloud · head to head
Amazon VPC vs AWS Lambda

Amazon VPC
Cloud
The private network layer for AWS, free to create with paid NAT, endpoints and addresses
- From
- Free
- Free plan
- Yes

AWS Lambda
Cloud
Run code without thinking about servers
- From
- Free
- Free plan
- Yes
The short version
- AWS Lambda is a serverless compute service.
- AWS Lambda is free; Amazon VPC starts at $0.005/mo.
- Only Amazon VPC lists subnets and routing; only AWS Lambda lists event-driven execution.
- Where Amazon VPC falls short: every public IPv4 address costs about $3.60 a month, including idle ones, so unused elastic IPs quietly add cost.
- Where AWS Lambda falls short: provisioned concurrency, used to avoid cold starts, is charged separately at $0.0000041667 per GB-second whether or not the function runs.
How do Amazon VPC and AWS Lambda differ?
Amazon VPC and AWS Lambda differ on pricing model and platforms (Web against Web, API). Only the attributes on which Amazon VPC and AWS Lambda actually diverge.
| Attribute | Amazon VPC | AWS Lambda |
|---|---|---|
| Pricing model | Free VPC, metered NAT gateways, addresses and add-ons | Usage-based |
| Platforms | Web | Web, API |
Identical on both: starting price (Free), free tier (Yes).
Not yet recorded: category for Amazon VPC, founded for Amazon VPC.
Which features does each one have?
They share no listed features; 6 appear only for Amazon VPC and 20 only for AWS Lambda. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.
Only in Amazon VPC
- Subnets and routing
- Security groups and NACLs
- NAT gateways
- PrivateLink endpoints
- Flow Logs and Traffic Mirroring
- IPAM
Only in AWS Lambda
- Function-as-a-Service
- Event-driven execution
- Auto-scaling
- Pay-per-use
- Multiple languages
- Concurrency limits
- Dead Letter Queues
- Environment variables
What is each one used for?
Amazon VPC is most often brought in for isolating production, staging and development workloads in separate networks; AWS Lambda for event-driven functions without managing servers. The jobs each tool is most often brought in to do.
Amazon VPC
- Isolating production, staging and development workloads in separate networksnot AWS Lambda
- Giving private subnets outbound access through a NAT gateway while blocking inbound trafficnot AWS Lambda
- Reaching S3 and other AWS services over private endpoints to avoid NAT data chargesnot AWS Lambda
- Capturing and mirroring traffic for intrusion detectionnot AWS Lambda
AWS Lambda
- Event-driven functions without managing serversnot Amazon VPC
- API backends behind API Gatewaynot Amazon VPC
- Processing S3, DynamoDB, SQS and Kinesis eventsnot Amazon VPC
- Scheduled jobs without a always-on instancenot Amazon VPC
- Edge compute through Lambda@Edgenot Amazon VPC
Where do Amazon VPC and AWS Lambda fall short?
Amazon VPC's most cited limit: every public IPv4 address costs about $3.60 a month, including idle ones, so unused elastic IPs quietly add cost. AWS Lambda's: ephemeral storage beyond the included 512 MB is metered. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
Amazon VPC
- NAT gateways charge $0.045 per hour and $0.045 per GB, so private workloads pulling large data volumes from the internet can generate a large bill with no obvious source
- Every public IPv4 address costs about $3.60 a month, including idle ones, so unused elastic IPs quietly add cost
- Cross-Availability Zone traffic is billed per GB, so designs that spread chatty services across zones pay for the resilience in data transfer fees
- Networking is regional and per account, so connecting many VPCs needs Transit Gateway or peering, each with its own pricing and limits
- Security groups, NACLs and route tables are easy to misconfigure, and there is no built-in policy checking beyond tools such as Reachability Analyzer, which is billed per analysis
AWS Lambda
- Billed on two axes at once, $0.20 per million requests plus $0.0000166667 per GB-second of duration, so memory settings change the bill as much as traffic does
- Provisioned concurrency, used to avoid cold starts, is charged separately at $0.0000041667 per GB-second whether or not the function runs
- Ephemeral storage beyond the included 512 MB is metered
- Lambda@Edge costs $0.60 per million requests, three times the standard request rate
- VPC use and cross-region data transfer carry EC2 charges on top
How much do Amazon VPC and AWS Lambda cost?
Amazon VPC has a free plan, with paid plans from $0.005/mo; AWS Lambda is free to use. Plan by plan below, from each vendor's own pricing page.
Amazon VPC
Free- VPC, subnets and security groupsFree
- No charge to create a VPC, subnets, route tables, security groups or network ACLs
- NAT Gateway$0.045/hour
- $0.045 per hour per gateway
- $0.045 per GB processed
- Regional NAT Gateway is $0.045 per hour per Availability Zone
- Public IPv4 address$0.005/hour
- $0.005 per hour, in use or idle
- Traffic mirroring $0.015 per session hour
- IPAM Advanced Tier $0.00027 per active IP address hour
AWS Lambda
Free- Free TierFree
- 1M free requests/month
- 400,000 GB-seconds/month
- Always free
Which should you pick?
Choose Amazon VPC if
- You need subnets and routing.
- You want to start without paying.
- You also want security groups and nacls.
Choose AWS Lambda if
- You need function-as-a-service.
- You want to start without paying.
- You work on Web, API.
- You also want event-driven execution.
Questions people ask
- Is Amazon VPC or AWS Lambda better?
- It depends on the job. Amazon VPC fits isolating production, staging and development workloads in separate networks; AWS Lambda fits event-driven functions without managing servers. Amazon VPC starts at Free and AWS Lambda at Free.
- Which is cheaper, Amazon VPC or AWS Lambda?
- Amazon VPC starts at Free and AWS Lambda at Free.
- Does Amazon VPC or AWS Lambda run on more platforms?
- Amazon VPC runs on Web. AWS Lambda runs on Web, API.
- Can I use Amazon VPC for free?
- Both have a free tier, so you can try either at no cost before committing.
- What is Amazon VPC best used for?
- Amazon VPC is most often used for isolating production, staging and development workloads in separate networks, giving private subnets outbound access through a nat gateway while blocking inbound traffic, reaching s3 and other aws services over private endpoints to avoid nat data charges, capturing and mirroring traffic for intrusion detection. Of those, isolating production, staging and development workloads in separate networks and giving private subnets outbound access through a nat gateway while blocking inbound traffic are not what AWS Lambda is typically brought in for.
- What can Amazon VPC do that AWS Lambda cannot?
- Amazon VPC covers Subnets and routing, Security groups and NACLs, NAT gateways, PrivateLink endpoints. AWS Lambda covers Function-as-a-Service, Event-driven execution, Auto-scaling, Pay-per-use.
Answered from the vendors’ own pages
Amazon VPC: Is Amazon VPC free?
Creating a VPC, subnets, route tables and security groups is free. NAT gateways, public IPv4 addresses, traffic mirroring and PrivateLink endpoints are charged.
AWS Lambda: Is there a free tier for AWS Lambda?
Yes. AWS Lambda offers a free tier including 1 million requests per month, 400,000 GB-seconds per month, and 100 GB monthly response streaming.
SourceAmazon VPC: How much does a NAT gateway cost?
$0.045 per hour in US East plus $0.045 per GB processed, per the AWS pricing page, before standard data transfer charges.
AWS Lambda: How is AWS Lambda charged?
Lambda charges $0.20 per million requests. Duration charges are $0.0000166667 per GB-second for x86 (up to 6 billion GB-seconds/month in US East Ohio with tiered pricing). Ephemeral storage over the included 512 MB costs $0.0000000309 per GB-second. Provisioned Concurrency costs $0.0000041667 per GB-second with a 5-minute minimum.
SourceAmazon VPC: Are public IPv4 addresses charged?
Yes. $0.005 per hour per public IPv4 address, whether in use or idle.
AWS Lambda: What are Lambda Durable Functions pricing?
Lambda Durable Functions include operations at $8.00 per million (start execution, steps, waits). Data written costs $0.25 per GB. Data retention is $0.15 per GB-month with configurable 1-90 day retention (default 14 days).
SourceRelated pages
Other head to heads
- Amazon VPC vs Google Cloud Platform
- Amazon VPC vs HAProxy
- Amazon VPC vs Cilium
- Amazon VPC vs Coolify
- Amazon VPC vs DigitalOcean
- Amazon VPC vs Hetzner Cloud
- Amazon VPC vs Nutanix
- Amazon VPC vs OVHcloud
- Amazon VPC vs OpenStack
- Amazon VPC vs Proxmox VE
- Amazon VPC vs Scaleway
- Amazon VPC vs Portworx
- Amazon VPC vs Nomad
- Amazon VPC vs OpenEBS
- Amazon VPC vs Paperspace
- Amazon VPC vs Longhorn
- Amazon VPC vs minikube
- Amazon VPC vs Rook
- Amazon VPC vs Google Cloud Run
- Amazon VPC vs Deno Deploy
- Amazon VPC vs Zoho Catalyst
- Amazon VPC vs Azure Functions
- Amazon VPC vs Google App Engine
- Amazon VPC vs Serverless Framework
- Amazon VPC vs Cerebrium
- Amazon VPC vs Koyeb
- Amazon VPC vs Beam Cloud
- Amazon VPC vs KeyCDN
- Amazon VPC vs Lambda
- Amazon VPC vs Porter
- Amazon VPC vs Crusoe Cloud
- Amazon VPC vs Infracost
- Amazon VPC vs Kustomize
- Amazon VPC vs Lium
- Amazon VPC vs Nebius
- Amazon VPC vs Nitric
- AWS Lambda vs Google Cloud Platform
- AWS Lambda vs HAProxy
- AWS Lambda vs Cilium
- AWS Lambda vs Coolify
- AWS Lambda vs DigitalOcean
- AWS Lambda vs Hetzner Cloud
- AWS Lambda vs Nutanix
- AWS Lambda vs OVHcloud
- AWS Lambda vs OpenStack
- AWS Lambda vs Proxmox VE
- AWS Lambda vs Scaleway
- AWS Lambda vs Portworx
- AWS Lambda vs Nomad
- AWS Lambda vs OpenEBS
- AWS Lambda vs Paperspace
- AWS Lambda vs Longhorn
- AWS Lambda vs minikube
- AWS Lambda vs Rook
- AWS Lambda vs Google Cloud Run
- AWS Lambda vs Deno Deploy
- AWS Lambda vs Zoho Catalyst
- AWS Lambda vs Azure Functions
- AWS Lambda vs Google App Engine
- AWS Lambda vs Serverless Framework
- AWS Lambda vs Cerebrium
- AWS Lambda vs Koyeb
- AWS Lambda vs Beam Cloud
- AWS Lambda vs KeyCDN
- AWS Lambda vs Lambda
- AWS Lambda vs Porter
- AWS Lambda vs Crusoe Cloud
- AWS Lambda vs Infracost
- AWS Lambda vs Kustomize
- AWS Lambda vs Lium
- AWS Lambda vs Nebius
- AWS Lambda vs Nitric
