0
0
Firebasecloud~5 mins

Firebase vs AWS vs Supabase comparison - CLI Comparison

Choose your learning style9 modes available
Introduction
Choosing where to build your app's backend can be confusing. Firebase, AWS, and Supabase offer ways to store data, handle users, and run your app smoothly. This comparison helps you understand their differences simply.
When you want a ready-to-use backend with easy setup and real-time features, Firebase is a good choice.
When you need a wide range of cloud services and full control over infrastructure, AWS fits well.
When you prefer an open-source, SQL-based backend that feels like Firebase but with more database control, Supabase is helpful.
When you want to build a small app quickly without managing servers, Firebase or Supabase can save time.
When your app might grow big and need custom cloud functions or complex workflows, AWS offers more flexibility.
Commands
This command starts setting up Firebase in your project folder. It helps you choose features like hosting, database, and functions.
Terminal
firebase init
Expected OutputExpected
=== Project Setup === You are about to initialize a Firebase project. ? Which Firebase CLI features do you want to set up for this folder? Press Space to select features, then Enter to confirm your choices. ◯ Database: Deploy Firebase Realtime Database Rules ◯ Firestore: Deploy rules and create indexes for Firestore ◯ Functions: Configure and deploy Cloud Functions ◯ Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys ◯ Storage: Deploy Cloud Storage security rules ◯ Emulators: Set up local emulators for Firebase features Firebase initialization complete.
--project - Specify the Firebase project ID to use
This command sets up your AWS credentials and default region so you can use AWS services from your computer.
Terminal
aws configure
Expected OutputExpected
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-east-1 Default output format [None]: json
This command initializes a Supabase project locally, setting up configuration files and preparing your environment.
Terminal
supabase init
Expected OutputExpected
✔ Creating new Supabase project configuration ✔ Writing supabase/config.toml Supabase project initialized successfully.
This command uploads your app's backend and hosting files to Firebase servers, making your app live.
Terminal
firebase deploy
Expected OutputExpected
=== Deploying to 'my-firebase-project'... ✔ Deploy complete! Project Console: https://console.firebase.google.com/project/my-firebase-project/overview
--only hosting - Deploy only the hosting part of your Firebase project
This command lists your storage buckets in AWS S3, showing where your files can be stored.
Terminal
aws s3 ls
Expected OutputExpected
2024-06-01 12:00:00 my-app-bucket 2024-06-02 15:30:00 logs-bucket
Key Concept

If you remember nothing else, remember: Firebase is easy and real-time, AWS is powerful and flexible, Supabase is open-source and SQL-based.

Common Mistakes
Trying to use Firebase commands without logging in first
Firebase CLI needs you to be logged in to connect to your project and deploy
Run 'firebase login' before running other Firebase commands
Not configuring AWS credentials before using AWS CLI commands
AWS CLI commands fail without credentials set, causing errors
Run 'aws configure' and enter your access keys and region
Assuming Supabase works exactly like Firebase without checking SQL database differences
Supabase uses PostgreSQL, so some Firebase features differ or need SQL knowledge
Learn basic SQL and Supabase docs to use it effectively
Summary
Use 'firebase init' and 'firebase deploy' to set up and publish apps quickly with Firebase.
Use 'aws configure' to set up AWS CLI access and 'aws s3 ls' to manage storage buckets.
Use 'supabase init' to start a Supabase project that offers an open-source SQL backend.