DEV Community

Alex Spinov
Alex Spinov

Posted on

SST Ion Has a Free API That Most Developers Dont Know About

SST Ion (v3) is a framework for building full-stack apps on AWS. It uses Pulumi under the hood and provides a simple component model for Lambda, databases, and more.

Define Infrastructure

// sst.config.ts
export default $config({
  app(input) {
    return { name: "my-app", home: "aws" };
  },
  async run() {
    const bucket = new sst.aws.Bucket("Uploads");
    const db = new sst.aws.Dynamo("DB", {
      fields: { pk: "string", sk: "string" },
      primaryIndex: { hashKey: "pk", rangeKey: "sk" }
    });

    const api = new sst.aws.Function("Api", {
      handler: "src/api.handler",
      link: [bucket, db],
      url: true
    });

    const site = new sst.aws.Nextjs("Site", {
      link: [api, bucket]
    });

    return { url: site.url, api: api.url };
  }
});
Enter fullscreen mode Exit fullscreen mode

Access Linked Resources

// src/api.ts
import { Resource } from "sst";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";

const db = new DynamoDBClient({});
// Resource.DB.name gives the table name — auto-linked!
Enter fullscreen mode Exit fullscreen mode

CLI

sst dev        # Live development with hot reload
sst deploy     # Deploy to AWS
sst remove     # Tear down
Enter fullscreen mode Exit fullscreen mode

Key Features

  • Full-stack AWS framework
  • Resource linking (type-safe)
  • Live development mode
  • Next.js, Remix, Astro support
  • Secrets management

Need to scrape or monitor web data at scale? Check out my web scraping actors on Apify or email spinov001@gmail.com for custom solutions.

Top comments (0)