admin管理员组

文章数量:1431726

SST (Serverless Stack) is an open-source framework developed by Anomaly Innovations that helps you build and deploy serverless applications on AWS. It offers several features and tools to make developing serverless applications easier and more efficient.

I am migrating from the V2 to V3.3.21 so this is my sst.config.ts

import { SSTConfig } from "sst";
import { MyStack } from "./stack/MyStack";

export default {
  config(_input) {
    return {
      name: "app",
      region: "us-east-1",
    };
  },
  stacks(app) {
    app.setDefaultFunctionProps({
      runtime: "nodejs20.x",//runtime for the generated functions to ss
    });

    app.addDefaultFunctionPermissions("*");//lambda functions permissions

    app.stack(MyStack);
    // app.stack(Dynamo);
  },
} satisfies SSTConfig;

and I wish to know where is the SSTConfig gone? Or what is the replacement for it? Thank you for your help. I've searched for the whole web, but this version is recent (at the moment I write this post), so I found any docs about the migration from V2.x to V3.3.21

SST (Serverless Stack) is an open-source framework developed by Anomaly Innovations that helps you build and deploy serverless applications on AWS. It offers several features and tools to make developing serverless applications easier and more efficient.

I am migrating from the V2 to V3.3.21 so this is my sst.config.ts

import { SSTConfig } from "sst";
import { MyStack } from "./stack/MyStack";

export default {
  config(_input) {
    return {
      name: "app",
      region: "us-east-1",
    };
  },
  stacks(app) {
    app.setDefaultFunctionProps({
      runtime: "nodejs20.x",//runtime for the generated functions to ss
    });

    app.addDefaultFunctionPermissions("*");//lambda functions permissions

    app.stack(MyStack);
    // app.stack(Dynamo);
  },
} satisfies SSTConfig;

and I wish to know where is the SSTConfig gone? Or what is the replacement for it? Thank you for your help. I've searched for the whole web, but this version is recent (at the moment I write this post), so I found any docs about the migration from V2.x to V3.3.21

Share Improve this question asked Nov 19, 2024 at 7:06 AroAro 3091 gold badge4 silver badges12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Probably you already fix this, but here it goes. In sst v3 the SSTConfig does not exist anymore and you have to call the function config like this:

/// <reference path="./.sst/platform/config.d.ts" />

export default $config({
  app(input) {}
})

Inside the return of the app you set the main parameters of your app, and in the return of the config you set the components you want to create (functions, cron, etc)

本文标签: amazon web servicesSST(Serverless Stack)Migration from the V2 to V3321Stack Overflow