最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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)

发布评论

评论列表(0)

  1. 暂无评论