amazon web services - SST(Serverless Stack) : Migration from the V2 to V3.3.21 - Stack Overflow

SST (Serverless Stack) is an open-source framework developed by Anomaly Innovations that helps you buil

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)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745578858a4634132.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信