AWS cost review for a small Laravel or WordPress setup

Small Laravel and WordPress setups on AWS rarely get expensive because of traffic. They get expensive from idle resources, defaults nobody changed and data paths nobody drew. Here is the cost review I run, in the order I run it.

In short

  • The problem: the AWS bill for a modest Laravel app or WordPress store creeps up every month, and nobody can say why. The product hasn't grown much, but the invoice has, and the money is going to things no customer ever touches.
  • What I do about it: a short, ordered review: find who owns each line on the bill, remove what is idle, fix the defaults that quietly cost money, then right-size what is left. Commitments and discounts come last, not first.
  • Who this is for: founders and small teams running one or two PHP products on AWS, usually with a monthly bill that has drifted well past what the traffic justifies.

The pattern is familiar. Someone set up the AWS account two years ago, followed a few tutorials, launched, and moved on. The app works. Traffic is roughly what it was. But the bill has grown every quarter, and the founder now opens it the way people open a parking fine.

When I look at a bill like that, the cause is almost never "the app needs more servers." It is a staging database that has been running since the last launch, snapshots from a migration that finished long ago, a NAT gateway carrying traffic that never needed to leave the VPC, and log groups set to keep everything forever.

None of these are mistakes anyone made on purpose. They are defaults and leftovers. That is good news, because it means most of the savings come from cleanup, not re-architecture.

Start with the bill, not the architecture diagram

The first instinct is to open the console and start clicking through services. I start in Cost Explorer instead, grouped by service and then by usage type, for the last three months. The question is simple: which five lines make up most of the bill, and has each of them grown?

Usage type matters more than service. "EC2" on its own hides a lot. Broken down, it might be instance hours, EBS volumes, snapshots, data transfer, NAT gateway hours and public IP addresses, which are often billed under EC2 or VPC lines even though nobody thinks of them as "servers."

Then I check two things that make every later step easier:

  • Tags. If resources aren't tagged with at least an environment (production, staging) and an owner, I add that first. Activate the tags as cost allocation tags so they show up in Cost Explorer. Without them, the review turns into archaeology.
  • Regions. I look at the bill by region. Resources in a region the team doesn't think it uses are the clearest sign of a forgotten experiment.

Idle resources are the cheapest money you'll ever save

Deleting something nobody uses has no performance risk and no trade-off. It is where I spend the first hour.

The usual suspects on a small PHP setup:

  • Unattached EBS volumes. Left behind when an instance was terminated without "delete on termination," or after a resize. They bill every month whether attached or not.
  • Old snapshots and AMIs. Manual snapshots taken "just before the migration" and never removed. Automated backup tools that keep more copies than anyone decided on.
  • Idle Elastic IPs and public IPv4 addresses. Since February 1, 2024, AWS charges $0.005 per hour for every public IPv4 address, whether it is attached to something or not. One address is small money. A setup with a public IP on every instance, a few idle Elastic IPs and a load balancer adds up quietly.
  • Non-production environments running 24/7. A staging stack that mirrors production, including a Multi-AZ database, running every hour of the year for a team that tests in working hours.
  • Load balancers with nothing behind them. Often from a blue-green experiment or an abandoned subdomain.
  • Old ECR images and S3 build artifacts. Small per item, but they grow without limit if no lifecycle rule exists.

For staging, I prefer to make it cheap rather than delete it: a smaller single-AZ database, a smaller instance, and a schedule that stops it outside working hours. The rule I suggest is that nothing outside production should be more resilient than it needs to be to test the deploy.

Defaults that quietly cost money

The second pass is settings that were never wrong enough to notice.

Log groups that keep everything forever

By default, CloudWatch Logs keeps log data indefinitely; it never expires. A Laravel app that logs every request at debug level, or a WordPress site with verbose plugin logging shipped to CloudWatch, will pay for ingestion and then pay again every month to store logs nobody reads.

I set a retention period on every log group (CloudWatch allows anything from one day to ten years) and turn the application log level down in production. Thirty days of application logs is plenty for most small teams; audit logs that must be kept longer belong in a separate group with their own rule.

gp2 volumes that should be gp3

Older setups often still use gp2 EBS volumes. AWS's own migration guide lists gp3 at $0.08 per GiB-month against $0.10 for gp2 in us-east-1, and gp3 comes with a baseline of 3,000 IOPS and 125 MiB/s regardless of size, which is better than a small gp2 volume gets. The switch is done with Elastic Volumes, without detaching the volume or restarting the instance.

It is one of the few changes that is cheaper and faster at the same time. I still do it outside peak hours and check the volume's performance afterward, because a large gp2 volume may have been relying on size-based IOPS that need to be provisioned explicitly on gp3.

S3 buckets without lifecycle rules

A media bucket for a WordPress site or an uploads bucket for Laravel grows forever by design. That's fine. What isn't fine is versioning switched on with no rule to expire old versions, or incomplete multipart uploads left behind by failed large uploads. Both are invisible in the bucket listing and visible on the bill. One lifecycle rule handles each.

Database engines past standard support

Amazon RDS charges for Extended Support on engine versions that have passed their end of standard support date, starting the day after that date. Those charges apply per instance, including Multi-AZ standbys. A small team that never planned a major MySQL upgrade can end up paying a premium simply for staying put. I check the engine version of every RDS instance against the RDS version calendar and put the upgrade on the roadmap before the date, not after.

Data paths are where surprises live

Data transfer is the line people understand least, because it isn't a resource you can see. Drawing where bytes actually go usually finds something.

The most common one on small setups is the NAT gateway. If app servers sit in private subnets, every request they make to the internet goes through a NAT gateway, which bills for each hour it runs and for each gigabyte it processes. That includes traffic to S3 if no endpoint is in place. A Laravel queue worker pushing uploads to S3, or a WordPress offload plugin syncing media, can send a lot of gigabytes through NAT that never needed to go there. AWS's own guidance is to use a gateway endpoint for S3 so that traffic stays off the NAT gateway.

Other paths I check:

  • Assets served from the origin. Images and scripts served straight from EC2 instead of through a CDN cost transfer and server time. I covered the S3 and CloudFront baseline in AWS S3, CloudFront, and IAM patterns I ship with Laravel.
  • Cross-AZ chatter. An app server in one Availability Zone talking to a cache or database in another pays for that traffic both ways. For a small setup it is usually minor, but worth knowing about before adding more instances.
  • Backups copied to other regions on a schedule nobody remembers agreeing to.

Right-size only after the cleanup

Once idle resources and bad defaults are gone, the remaining bill is mostly the things the product actually runs on: instances and the database. Now it makes sense to ask whether they are the right size.

I look at at least two weeks of CPU, memory and connection metrics, including the busiest days. The failure I see most often is an instance chosen during a launch scare and never revisited, running at a low single-digit CPU average. The opposite also happens: a database instance so small it relies on burst credits and slows down at exactly the wrong time. Right-sizing goes both ways.

For PHP specifically, memory matters more than CPU. PHP-FPM workers are sized by memory, so an instance family with more memory per vCPU often fits a Laravel or WordPress box better than a compute-heavy one. It's also worth checking whether the workload runs on Graviton (ARM) instances; most PHP stacks do with no code changes, though every extension and Docker base image needs confirming first.

If the app has outgrown one server, the answer is still not automatically a bigger architecture. I wrote about where the line sits in Kubernetes for a small PHP team.

Commit only to what you're sure you'll keep

Savings Plans and Reserved Instances give meaningful discounts in exchange for committing to a level of usage for one or three years. They are worth it, but they belong at the end of the review, for a simple reason: committing first locks in the waste you were about to remove.

My rule is to commit only to the baseline that has been stable for several months after cleanup and right-sizing, and to start with a one-year term on a small portion. Savings Plans are usually the safer choice for a small team because they follow usage across instance sizes and families, which matters when you're still adjusting.

Trade-offs: where cost-cutting goes too far

A cost review that only looks at the bill can make the product worse. These are the places I push back:

  • Removing redundancy from production. Turning off Multi-AZ on the production database saves real money and removes your failover. That's a business decision about downtime, not a cleanup item. Make it explicitly, with the founder, not quietly in a cost ticket.
  • Cutting backup retention to the bone. Snapshots are cheap compared to losing a week of orders. Trim duplicates and forgotten manual copies, keep the policy you would want after a bad day.
  • Spending engineering weeks to save small amounts. If the whole bill is modest, a month of engineer time spent re-architecting for savings will take years to pay back. Cleanup is cheap; rewrites are not.
  • Spot instances for stateful work. Spot is good for batch jobs and can work for queue workers that tolerate interruption. It is the wrong place for the only web server or anything holding state.
  • Moving off AWS to save money. Sometimes right, often a distraction. If the bill is high because of idle resources, a new provider will collect the same idle resources within a year.

What I check on a project like this

  1. Ownership: every resource tagged with environment and owner, with tags active for cost allocation.
  2. Top five lines: the biggest cost lines by usage type, with a known reason for each one's growth.
  3. Idle resources: unattached volumes, stale snapshots, idle IP addresses, empty load balancers and forgotten regions removed.
  4. Non-production: staging and dev sized down and scheduled to stop outside working hours.
  5. Defaults: log retention set on every log group, gp2 moved to gp3, lifecycle rules on growing buckets.
  6. Data paths: an S3 gateway endpoint in place where private subnets use a NAT gateway, and static assets served through a CDN.
  7. Engine versions: every RDS instance on a version in standard support, with the next upgrade dated.
  8. Guardrails: an AWS Budgets alert and Cost Anomaly Detection set up, so the next drift is noticed in days rather than quarters.

A small Laravel or WordPress setup on AWS should have a bill that someone on the team can explain line by line. Most of the time, getting there takes cleanup, a few changed defaults and one drawn data path, not a migration. Do the boring removals first, right-size with real metrics, commit last, and treat anything that reduces resilience as a business decision rather than a saving.