Ion, the new deployment engine for SST (Serverless Stack Toolkit). SST is a framework that simplifies building modern full-stack applications on your own infrastructure. Here’s what you need to know about Ion:

What Is Ion?:

  • on is an open-source engine designed for deploying SST applications.
  • Unlike SST’s previous engine (which used CDK and CloudFormation), Ion leverages Pulumi and Terraform.
  • It’s generally available and recommended for new SST users.
  • The components you define in Ion look similar to existing ones, but the underlying deployment process is different.

How It Works:

  • Define Frontend: Start by defining your frontend (e.g., Next.js, Remix, Astro, or an API) in code.
  • Configure Backend: Configure backend features (e.g., cron jobs, buckets, queues, databases) using code.
  • Infrastructure: Components create necessary infrastructure in your AWS account without using the AWS Console.
  • Components: These snippets define your application’s features, all while maintaining flexibility and scalability.

Example code:

Define a Next.js frontend

sst.config.ts
new sst.aws.Nextjs("MyWeb", { domain: "my-app.com" });

Set up backend features (e.g., cron job, bucket, queue, Postgres):

sst.config.ts
new sst.aws.Cron("MyCronJob", { job: "src/cron.handler", schedule: "rate(1 minute)" });
new sst.aws.Bucket("MyBucket");
const myQueue = new sst.aws.Queue("MyQueue");
myQueue.subscribe("src/subscriber.handler");
new sst.aws.Postgres("MyDatabase");

Roadmap:

  • Ion continues to evolve, and support for other frontends is on the roadmap.
  • SST v3 will eventually be based on Ion once it’s stable.

In summary, Ion combines the power of serverless computing with component-based architecture, making it a promising choice for modern web applications.