Testing Filebase with curl (and AWS CLI) Before Integrating into a Project

Recently, I’ve been working on a project that uses Filebase as an S3-compatible storage layer. Before (and during) development, I wanted a quick way to verify that my credentials, bucket, and basic operations were working correctly, without diving straight into application code.

Below is a simple workflow I use to test Filebase locally using AWS CLI (and later curl if needed).


1. Install AWS CLI

brew install awscli

2. Export Filebase Credentials

I prefer exporting environment variables so I don’t have to repeat them for every command:

export AWS_ACCESS_KEY_ID="your_filebase_key_id"
export AWS_SECRET_ACCESS_KEY="your_filebase_secret_key"
export FILEBASE_BUCKET="your_bucket_name"

Filebase is S3-compatible, so standard AWS credentials work fine here.


3. List Bucket Contents

This is usually the first check to confirm credentials and bucket access:

aws s3 ls s3://$FILEBASE_BUCKET \
  --endpoint-url https://s3.filebase.com

If this works, your keys and bucket setup are correct.


4. Upload a Test File

aws s3 cp /path/to/file.png \
  s3://$FILEBASE_BUCKET/test-upload.png \
  --endpoint-url https://s3.filebase.com

5. Verify the Upload

aws s3 ls s3://$FILEBASE_BUCKET \
  --endpoint-url https://s3.filebase.com

You should see test-upload.png in the output.


Why I Do This

When integrating object storage into a real project, I’ve found it very helpful to:

  • Validate credentials early
  • Confirm read/write permissions
  • Eliminate infrastructure issues before debugging application code

This quick sanity check has saved me a lot of time, especially when working across different environments.


Filebase Signup

If you haven’t tried Filebase yet, here’s the referral link I’m using:

:backhand_index_pointing_right: Filebase