iTranslated by AI
Stop Overpaying for RDS: Use Docker for Free Development or Switch to Lightsail
*This page contains promotions.
What you will learn in this article:
- Using RDS for personal development (starting at ~3,000 JPY/month) is like driving a Ferrari to the convenience store.
- You can make your database costs 0 JPY by using Docker during development.
- If you want to publish your app, you can use Lightsail for a fixed (low) price.
Introduction: Do you really need "RDS" for that database?
When building an application on AWS, a textbook configuration looks like this:
- Server: EC2
- Database: RDS (Amazon Relational Database Service)
Then, you look at your monthly bill and turn pale. "EC2 is in the free tier, but RDS alone is costing me over 3,000 JPY every month!"
RDS is a wonderful service. Backups are automated, and it recovers automatically if a failure occurs. However, do you really need such advanced features for a "development environment used only by yourself" or a "small application for your portfolio"?
It is like "renting a 50,000 JPY per night luxury hotel suite when you just need a place to sleep." Today, I will teach you how to choose a "lodging (database)" that fits your needs and dramatically reduce your fixed costs.
Recommended Books
▼ Thorough Preparation: AWS Certified Solutions Architect
▼ The Basics of Docker & Kubernetes: Understanding Mechanisms and Usage
1. Option A: Docker (Local)
~ "Tent Camping" for 0 Cost ~
When you are "in development (coding)," you don't even need to create a database on AWS. You can simply start your DB on your PC using Docker.
Why is it 0 JPY?
Using Docker allows you to instantly spin up a "virtual database server" on your own PC. Since you are using your PC's resources (CPU/Memory) instead of an AWS server, it is, of course, completely free.
Pros & Cons
👍 Pros:
- Completely free. It costs 0 JPY no matter how many hours it runs.
- Startup/deletion is instant (one command).
- You can develop even without an internet connection.
👎 Cons:
- The DB stops when you close your PC (obviously).
- It cannot be accessed from the production environment (the internet).
What does this mean?
This is like "tent camping." The land cost is free. You are just pitching a tent (DB) on your own property (PC) to sleep. For "verifying functionality during development," this is more than enough. There is no need to pay AWS money for this.
# Example of docker-compose.yml (this is all you need to run a DB)
version: '3.8'
services:
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: password
ports:
- "3306:3306"
2. Option B: Amazon Lightsail
~ "Business Hotel" with Fixed Pricing ~
"But I want to publish my created app on the internet and show it to my friends," or "I want a DB on AWS so I can connect to it from EC2."
In such cases, consider the database features of Amazon Lightsail instead of RDS.
How is it different from RDS?
While RDS is "pay-as-you-go" (billing can skyrocket based on usage), Lightsail offers fixed monthly pricing (package pricing).
- RDS (t3.micro): Base cost + Storage + Data transfer + Backup costs... = ~3,000 JPY/month and up (variable)
- Lightsail Database: Includes everything (base, storage, data transfer, etc.) = ~15 USD (~2,200 JPY)/month and up ※
※ If you choose an "OS plan" where you install MySQL yourself within Lightsail, you can operate it for as low as 3.5 USD (~500 JPY)/month (though the difficulty level increases).
Pros & Cons
👍 Pros:
- Pricing is fixed, so there is no fear of "unexpected high charges."
- Like RDS, it is a "managed" service, making backups and other tasks easy.
- You can connect from EC2 using VPC peering.
👎 Cons:
- You cannot perform fine-grained settings (parameter tuning) like you can with RDS.
- It is not suited for large-scale scaling (expansion).
What does this mean?
This is a "business hotel." It may not have the concierge service of a luxury hotel (RDS), but it provides a bed and a shower (basic functionality), and most importantly, it is "affordable with fixed pricing." For a personal development app, a business hotel is more than enough.
3. [Comparison Chart] Which one should you choose?
To help you decide without hesitation, I have illustrated the selection criteria.
▼ How to choose a database (The "Pine, Bamboo, and Plum" approach)

4. Strategy for Different Phases
The smartest approach is to "combine" these methods.
- Development Phase:
- Use Docker on your local PC. Don't spend a single cent.
- Launch Phase (Initial):
- Use Lightsail for the DB when deploying to EC2 or App Runner. Keep costs fixed.
- Scaling Phase (When it goes viral):
- Once your user base grows and Lightsail can no longer handle it, only then migrate your data to RDS.
There is no need to use RDS from the start. "Stay in a luxury hotel (RDS) once you make it big." Until then, save wisely by camping (Docker) or staying in a business hotel (Lightsail).
Conclusion: Invest your saved money into "Knowledge"
By switching from RDS to Docker or Lightsail, you can save 30,000 to 40,000 JPY per year. Why not invest this saved money into "improving your own skills" instead of just putting it in savings?
If you deeply understand AWS pricing structures and development workflows using Docker, you can prevent such "waste" for the rest of your life.
📚 Two books to help you become a cost-conscious engineer
- Master AWS "Wallet Affairs" and "Design" - Associate Textbook. The sense of cost regarding "which service is cheap and which is expensive" is acquired through SAA (Solutions Architect) study. This is a must-read for "those who don't want to lose money on AWS," as you can learn about cost optimization for S3 and EC2, not just RDS.
▼ Thorough Preparation: AWS Certified Solutions Architect
2. Learn Docker from the basics to practice. If you thought, "How do I set up a DB with Docker?", check this out. Even if you are not good with the black screen (terminal), you can learn the mechanics of containers gently with diagrams. Acquire the standard for development environments.
▼ The Basics of Docker & Kubernetes: Understanding Mechanisms and Usage
Discussion