https://serverless-stack.com/ logo
Join Slack
Powered by
# sst
  • r

    Ross Coundon

    05/14/2022, 7:46 AM
    Looks like something’s gone a bit awry with the SST release process. I just ran
    sst  update
    against v1.0.11 and the result was 0.0.0-20220514063514
    f
    • 2
    • 5
  • b

    Boris Tane

    05/14/2022, 11:15 PM
    are there any plans to have an api gateway construct which supports open api definitions and request validation? it seems the current
    sst.ApiGatewayV1Api
    doesn't support it https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-apigateway.SpecRestApi.html
    f
    • 2
    • 3
  • j

    justindra

    05/16/2022, 1:09 PM
    Was there a reason for not supporting the original CDK types and instead just using strings for v1? E.g.
    Copy code
    // from
    app.setDefaultRemovalPolicy(cdk.RemovalPolicy.DESTROY);
    // to
    app.setDefaultRemovalPolicy("destroy");
    Instead of allowing both?
    t
    d
    • 3
    • 6
  • i

    Ivan Roskoshnyi

    05/16/2022, 1:30 PM
    Hi all. Has anyone used
    pug
    with
    SST
    ? I am facing the following error:
    No loader is configured for ".pug" files:
    t
    • 2
    • 7
  • d

    Drew

    05/16/2022, 5:12 PM
    Any tips on making the build process faster? Our build process has grown very slow. We’re considering moving our node_modules into a lambda layer. We haven’t looked very closely at what is bundled into our lambdas yet. Any documentation on where to start?
    a
    t
    f
    • 4
    • 42
  • p

    Paul Swail

    05/17/2022, 2:10 PM
    hi folks. Finally getting round to experimenting with SST (just in time for the conference later! 😄). I’m interested in checking out the typescript monorepo linked to from this page, but it’s 404ing https://docs.serverless-stack.com/advanced/monorepo-project-structure
    t
    s
    • 3
    • 9
  • t

    Tony Boggis

    05/17/2022, 4:22 PM
    The site states that Python is supported - “coming soon”, it says here. The question I have is, how soon?
    f
    • 2
    • 3
  • d

    David Martin

    05/17/2022, 7:14 PM
    hey guys, great conference today! so i’m going to launch my SST app in about a week and i’m looking for advice on how to deploy & manage my production environment. for now i’m deploying my prod stack from the cli using
    sst deploy --stage prod
    . obviously that’s not the technique i want to use going forward. my current plan is to use SEED as you describe here (https://serverless-stack.com/chapters/getting-production-ready.html) . • is SEED still the path you’d recommend? • what other things should i be aware of for my production deployment process? thank you!
    a
    b
    • 3
    • 26
  • a

    Adrián Mouly

    05/17/2022, 10:03 PM
    I’m doing migration from 0.55 to 1.0.0… Can I still use classes? or I need to migrate all my classes into functions?
    t
    a
    +2
    • 5
    • 35
  • a

    Adrián Mouly

    05/18/2022, 3:27 PM
    Hey guys. My stacks has some dependencies from `aws-cdk-lib`… so I should install it on my
    package.json
    ? In that case, how I know the version? should I use the latest? My concern is having conflicts with the dependency from SST package.
    t
    • 2
    • 5
  • e

    Emanuel Bohnenkamp

    05/18/2022, 3:55 PM
    Hey guys, question, is it possible to upload config files without S3? I'm using https://www.npmjs.com/package/config but the 'config' folder created in 'backend' doesn't get uploaded.
    t
    • 2
    • 9
  • d

    Daniel Ashcraft

    05/18/2022, 4:09 PM
    Looking for some advice, ran into an interesting issue where sst spun up duplicate instances of open-search database on every dry dev run and i'm looking to prevent that in the future. This is using
    aws-cdk-lib/aws-opensearchservice
    and sst v1.1
    t
    j
    • 3
    • 26
  • d

    Drew

    05/19/2022, 6:00 AM
    Checking out the SST Console, and I’m wondering how long it should take to “Syncing metadata” …. 5 - 10 minutes?
    r
    m
    +2
    • 5
    • 15
  • i

    Ivan Roskoshnyi

    05/19/2022, 9:12 AM
    Hi all! I am using
    middy-validator
    to validate requests in
    SST
    is there a way to add custom message? Also...is it related to middy or
    JSON schema validation
    ? Tried to google it but found nothing
    a
    e
    r
    • 4
    • 5
  • t

    Trey Overton

    05/19/2022, 2:02 PM
    I have a stack defined in a package I import into my actual application. Routes that I define would use handlers that seem to require being specified by file path only. This means that when imported, it wants to go after a file location in the consuming app, not the location in the imported stack's package. Is there a way around this?
    t
    • 2
    • 4
  • r

    Ross Coundon

    05/19/2022, 5:26 PM
    Is there a way to specify defaults for all stacks that are contained in the App, from the App level? I.e
    addDfaultFunctionLayers
    ,
    addDefaultFunctionEnv
    but on/from App?
    d
    f
    t
    • 4
    • 9
  • p

    Paul Swail

    05/20/2022, 11:42 AM
    I noticed that the SST starter and example templates are using v2 of the AWS JS SDK. Any reason for not using v3?
    r
    t
    • 3
    • 4
  • p

    Paul Swail

    05/20/2022, 11:49 AM
    I see
    vitest
    is the test runner bundled in the starter templates. Is that what most of you are using? It’s the first I’ve heard of this framework, having mainly used Jest. Looking at the docs it looks the same API as Jest. Any gotchas to be aware of if switching to this from Jest?
    t
    y
    • 3
    • 32
  • p

    Paul Swail

    05/20/2022, 2:06 PM
    Is there a mechanism for deploying settings to SSM Parameter Store using SST? I’m thinking of settings such as secret third-party API keys here and not stack outputs. In the past, I’ve created a util to read from a local dotenv file (not version controlled) and write these to SSM under an
    /{appName}/{stage}
    prefix
    s
    t
    r
    • 4
    • 32
  • o

    outaTiME

    05/20/2022, 5:02 PM
    hello guys, for some reason I’m having problems when I configure the lambda authorizer for an endpoint, this was previously working and after the migration I can’t get it to work, in all cases I get
    "Internal Server Error"
    unless I disable it by putting
    "none"
    . Here I could see the call to the authorizer does it correctly but then it does not execute the endpoint:
    Copy code
    0a034172-e51c-4560-9206-f7758fd9aee0 REQUEST dev-ambito-dolar-stack-AuthorizerBD825682-RMeuTtqz2uyr [src/authorizers/basic.main] invoked by API GET /social-notify
    0a034172-e51c-4560-9206-f7758fd9aee0 RESPONSE {"isAuthorized":true}
    I tried to reduce everything to the minimum possible code, here I attach my definitions:
    Copy code
    // stack
    const api = new sst.Api(stack, 'Api', {
      accessLog: {
        retention: 'one_week',
      },
      authorizers: {
        basicAuthorizer: {
          type: 'lambda',
          function: new sst.Function(stack, 'Authorizer', {
            handler: 'src/authorizers/basic.main',
          }),
        },
      },
      defaults: {
        authorizer: 'none',
        function: {
          environment: {
            SNS_TOPIC: topic.topicArn,
          },
        },
      },
      routes: {
        'GET /social-notify': {
          authorizer: 'basicAuthorizer',
          function: 'src/routes/social-notify.handler',
        },
      },
    });
    // src/authorizers/basic.main
    export const main = async (event) => {
      const isAuthorized = process.env.SECRET_KEY === event?.headers?.authorization;
      return {
        isAuthorized,
      };
    };
    // src/routes/social-notify.handler
    export async function handler(event) {
      // pass
      return {
        headers: { 'Content-Type': 'application/json; charset=utf-8' },
        body: JSON.stringify({
          // pass
        }),
        statusCode: 200,
      };
    }
    f
    • 2
    • 5
  • i

    Ivan Roskoshnyi

    05/21/2022, 1:48 PM
    Hi all. Could anyone tell me how to spread
    Copy code
    REGION: stack.region,
    USER_POOL_ID: auth.userPoolId,
    IDENTITY_POOL_ID: auth.cognitoIdentityPoolId,
    USER_POOL_CLIENT_ID: auth.userPoolClientId,
    among lambda functions in SST? My stacks are being called in the following way:
    Copy code
    app
      .stack(ApiStack)
      .stack(StorageStack)
      .stack(AuthStack)
      .stack(SocketStack)
      .stack(FrontendStack)
    This is a new SST API so I had to use
    API Stack
    in
    Auth Stack
    via
    sst.use
    What is interesting is
    API Stack
    had being imported in
    Auth Stack
    to attach permissions. BUT when I am trying to do smth like this:
    Copy code
    const lambda = api.getFunction('POST /routeName')
    
    lambda?.addEnvironment(
     'USER_POOL_ID',
     auth.userPoolId
    )
    I am getting the following error in the terminal
    Copy code
    Error: 'dev-ApiStack' depends on 'dev-sst-AuthStack' (dev-sst-ApiStack -> dev-sst-AuthStack/Auth/UserPool/Resource.Ref, dev-sst-ApiStack -> dev-\sst-AuthStack/Auth/IdentityPool.Ref, dev-sst-ApiStack -> dev-sst-AuthStack/Auth/UserPoolClient/Resource.Ref). Adding this dependency (dev-sst-AuthStack -> dev-sst-ApiStack/API/Api/Resource.Ref) would create a cyclic reference.
    d
    f
    b
    • 4
    • 15
  • j

    jamlen

    05/23/2022, 12:14 PM
    I’m wanting to create some cucumber BDD tests which can be run either locally or in CI to test my API end-to-end. BTW there is no frontend for this, just APIs. As an example I’m wanting to publish an event on Event Bridge and then validate that the handler has processed that correctly by checking the database and output events being raised. How should I setup my SST to be able to run these? Do I need to have them running in a stack? Can I start my sst stacks up, execute my feature file tests and then stop the sst? Without doing that, how can I get the endpoints and the credentials I need to be available to the tests?
    f
    p
    • 3
    • 5
  • a

    Adrián Mouly

    05/23/2022, 4:04 PM
    Hello guys. I have 3 or 4 React apps in the same mono-repo, and I want to deploy each of them using
    ReactStaticSite
    . I created one stack for each of them, now, I want to use the same domain to access them, but changing the path. Like:
    <http://mycompany.com/site1|mycompany.com/site1>
    ,
    <http://mycompany.com/site2|mycompany.com/site2>
    …. etc. Is there a way to do this in the configuration? My idea is to have separated CFront Distributions for each, but sharing the same domain.
    d
    • 2
    • 6
  • a

    Adrián Mouly

    05/24/2022, 5:44 PM
    I executed
    sst update
    , but this didn’t update the
    resources
    package?
    t
    • 2
    • 15
  • k

    Klaus

    05/24/2022, 6:06 PM
    @thdxr Even after upgrading to 1.2.3 npm complains about vulnerabilities. The
    fix
    is also interesting, as it suggests to downgrade SST
    t
    • 2
    • 1
  • e

    Emanuel Bohnenkamp

    05/24/2022, 6:39 PM
    when I build it outside sst, everything seems to go to the 'server' folder, but when built with sst, it goes to 'serverless' folder, not sure if it's an issue or I'm missing a config or something. I'm following this tuto: https://serverless-stack.com/examples/how-to-create-a-nextjs-app-with-serverless.html
    f
    • 2
    • 1
  • a

    Adrián Mouly

    05/24/2022, 6:47 PM
    Question regarding testing..
    sst test
    has been removed, right? How should I execute my existing tests? also, should I migrate to Vitest?
    t
    f
    l
    • 4
    • 23
  • s

    Selo

    05/26/2022, 5:28 PM
    Hi, how do I make my S3 files accessible to the other users in the system? Now only the person uploaded the files can access them in the fronend.
    f
    • 2
    • 4
  • d

    Dan Suceava

    05/26/2022, 10:46 PM
    My backend mono-repo deployments are getting ridiculously slow, approaching 30 minutes. While I could live with that (not happily) for the CI/CD pipeline, for local development it's obviously a problem. I'm looking for some recommendations on addressing this. Is there a way to still work with a mono-repo but split the stacks in groups somehow and just run certain ones during development? Or do I need to split my mono-repo all-together?
    t
    d
    f
    • 4
    • 23
  • m

    Mischa Spiegelmock

    05/27/2022, 12:26 AM
    I want to make the best graphql/prisma/sst template repo, happy to discuss what i'm building and get reviews on it https://github.com/jetbridge/sst-prisma - there are some PRs open
    f
    • 2
    • 5
1...2930313233Latest