proomt

Search

Search posts, papers, and topics

All posts

NeonMike Jerome6 min readintermediate

When a file is uploaded, run the job on Neon

Summary

Neon now supports S3‑compatible Object Storage triggers that invoke long‑running Node.js Functions when a new object is created. The trigger sends a POST with bucket and key, letting the Function fetch the file, process it (e.g., catalog, image resizing, AI metadata, PDF indexing, moderation), and write results to Postgres. Triggers are branch‑scoped, work with scale‑to‑zero, and can be defined a…

  • Define a `storage_object_created` trigger on a bucket to automatically invoke a Neon Function on object upload.
  • The Function receives a JSON payload with `bucket_name` and `object_key`, can fetch the object, run arbitrary jobs, and write to Postgres.
  • Functions are long‑running and compatible with Neon’s scale‑to‑zero compute; they can wake a paused Postgres instance.
  • Triggers inherit across branches but are disabled by default on child branches, enabling safe testing.

Eliminates the need for external polling or custom webhook services to react to file uploads, tightly coupling storage, compute, and the database within the same region and branch. This reduces latency, simplifies architecture, and leverages Neon’s serverless scaling model for data‑driven pipelines.

6/10

Related reading

  1. Neon Functions: backend logic next to your data

    Neon Functions are server‑less Node.js 24 compute that run on the same branch and region as Neon’s Lakebase Postgres, giving low‑latency DB access, long‑running connections for agents/WebSockets, automatic credential injection, and branch‑aware deployment via neon.ts. They’re meant for data‑adjacent backend logic, not full‑stack hosting, and future plans include native cron and event triggers.

    Neonneon.com5 min
  2. Introducing Neon Labs

    Neon Labs is a new experimental web app (Next.js + TypeScript) that offers two PostgreSQL upgrade tools: a live‑catalog Upgrade Assessment that flags version‑specific blockers, and a Migration Assistant that auto‑generates import, pg_dump/restore, or logical‑replication pipelines based on DB size and downtime needs. The tools run read‑only against a Neon project, never expose connection strings,…

    Neonneon.com6 minrelease
  3. WAL + S3: Lakebase storage for the era of agents

    Neon's Lakebase Postgres redefines database storage by making the WAL the source of truth, stored on S3, rather than data files. This transaction-centric approach enables instant branching, time travel, and scalable, decoupled compute and storage for Postgres.

    Neonneon.com14 minHN4
  4. Query Neon backend logs

    Neon has introduced new capabilities to query backend logs for Neon Functions and Object Storage outside of the console. This includes a new CLI, API, SDK, and direct Loki endpoint access, allowing unified log inspection across different backend services on a branch.

    Neonneon.com3 min
  5. Neon is now available in Grok Bot

    Neon released a Grok Bot plugin that lets the AI assistant manage Neon PostgreSQL databases. After a one‑time auth, the bot can create projects, spin up isolated branches, run SQL, list databases, and set up usage‑summary routines directly from chat.

    Neonneon.com1 min