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

    Ömer Toraman

    10/19/2021, 4:32 PM
    Hello, am I mistaken that the API url should be
    <https://blabla.com/dev>
    when you run
    npx start --stage dev
    ?
    t
    • 2
    • 11
  • t

    Thomas Ankcorn

    10/19/2021, 5:10 PM
    Hey random thought, should the StaticSite construct have the ability to spawn a local dev server when running sst start?
    t
    • 2
    • 5
  • j

    Julien Goux

    10/20/2021, 7:34 AM
    Hello all, is there any option to run the API routes from the NextjsSite construct into regular lambdas?
    y
    • 2
    • 1
  • j

    Julien Goux

    10/20/2021, 7:34 AM
    I’d like to use RDS + RDS Proxy which requires to have my lambdas in the same VPC
    t
    • 2
    • 3
  • j

    Julien Goux

    10/20/2021, 7:43 AM
    Maybe your API construct coupled with the StaticSite construct is more what I’m after 🤔
    t
    • 2
    • 4
  • j

    Joseph Dan Alinsug

    10/20/2021, 12:27 PM
    Hey guys, I'm on
    0.46
    , I was wondering if the option
    minify
    on sst Function was removed or at a different place. I couldn't it find on
    Function.d.ts
    t
    • 2
    • 12
  • r

    Ross Coundon

    10/20/2021, 1:33 PM
    I'm trying to add Epsagon as a layer as per the instructions here. My code looks like this:
    Copy code
    if (!scope.local) {
          console.log(`Adding epsagon layer from ${process.env.EPSAGON_LAYER_ARN}`);
          const epsagon = LayerVersion.fromLayerVersionArn(this, 'EpsagonLayer', process.env.EPSAGON_LAYER_ARN);
          scope.addDefaultFunctionLayers([epsagon]);
          scope.addDefaultFunctionEnv({
            EPSAGON_TOKEN: process.env.EPSAGON_TOKEN,
            EPSAGON_APP_NAME: process.env.EPSAGON_APP_NAME,
            NODE_OPTIONS: '-r epsagon-frameworks --enable-source-maps',
          });
        }
    It's deployed via seed and I see the console.log inside the if block with the correct layer ARN but no layer is added to any of the functions. What could be going on?
    t
    a
    • 3
    • 46
  • ö

    Ömer Toraman

    10/20/2021, 4:33 PM
    https://github.com/serverless-stack/serverless-stack/pull/944
    t
    s
    • 3
    • 28
  • m

    Mike McCall

    10/21/2021, 4:24 AM
    Encountered an issue today where live lambda was working but the deployed version failing. The culprit was the graphql module. Setting the NODE_ENV to production fixed the problem. I had to look in the compiled js file from a build to figure this out. Thought I'd share because the way live lambda is run vs. how the code is deployed is not the same and can result in some confusion.
    Error: Cannot use e "__Schema" from another module or realm.
    k
    f
    • 3
    • 32
  • t

    Tomasz Sobczyk

    10/21/2021, 10:18 AM
    Yo! Update to my stack failed, when I checked in CF what happened I saw this, should I be worried?
    l
    f
    • 3
    • 3
  • r

    Ross Coundon

    10/21/2021, 11:26 AM
    I think previously if there were multiple separate applications running sst start then you'd get asked to specify a new port but just now (on latest version) it bombed out with
    Copy code
    Error: listen EADDRINUSE: address already in use :::12577
        at Server.setupListenHandle [as _listen2] (net.js:1320:16)
        at listenInCluster (net.js:1368:12)
        at Server.listen (net.js:1454:7)
        at Function.listen (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/express/lib/application.js:618:24)
        at Server.listen (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/cli/node_modules/@serverless-stack/core/dist/runtime/server.js:78:18)
        at startRuntimeServer (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/cli/scripts/start.js:311:10)
        at Object.module.exports [as start] (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/cli/scripts/start.js:154:9)
    
    Waiting for the debugger to disconnect...
    fatal error: all goroutines are asleep - deadlock!
                                                                                                                                            
    goroutine 1 [semacquire]:
    sync.runtime_Semacquire(0x0)
            runtime/sema.go:56 +0x25
    sync.(*WaitGroup).Wait(0xc000180000)
            sync/waitgroup.go:130 +0x71
    main.runService(0x1)
            <http://github.com/evanw/esbuild/cmd/esbuild/service.go:138|github.com/evanw/esbuild/cmd/esbuild/service.go:138> +0x4cb
    main.main()
            <http://github.com/evanw/esbuild/cmd/esbuild/main.go:200|github.com/evanw/esbuild/cmd/esbuild/main.go:200> +0x1eb
    
    goroutine 34 [chan receive]:
    main.runService.func1()
            <http://github.com/evanw/esbuild/cmd/esbuild/service.go:66|github.com/evanw/esbuild/cmd/esbuild/service.go:66> +0x4b
    created by main.runService
            <http://github.com/evanw/esbuild/cmd/esbuild/service.go:64|github.com/evanw/esbuild/cmd/esbuild/service.go:64> +0x212
    
    goroutine 35 [chan receive]:
    main.(*serviceType).sendRequest(0xc0001be140, {0x13f20a0, 0xc0029c4480})
            <http://github.com/evanw/esbuild/cmd/esbuild/service.go:163|github.com/evanw/esbuild/cmd/esbuild/service.go:163> +0xda
    main.runService.func2()
            <http://github.com/evanw/esbuild/cmd/esbuild/service.go:92|github.com/evanw/esbuild/cmd/esbuild/service.go:92> +0x39
    created by main.runService
            <http://github.com/evanw/esbuild/cmd/esbuild/service.go:89|github.com/evanw/esbuild/cmd/esbuild/service.go:89> +0x313
    t
    f
    • 3
    • 3
  • s

    Sam Hulick

    10/21/2021, 4:37 PM
    @thdxr so, this is very interesting.. https://github.com/Brooooooklyn/swc-node those speeds are insane! maybe this could be worked into SST for unit tests? (there’s a
    @swc-node/jest
    package)
    t
    a
    +2
    • 5
    • 22
  • ö

    Ömer Toraman

    10/21/2021, 10:22 PM
    Is it possible to set AWS Profile somewhere in the project? There would be better for people using multiple profiles.
    a
    s
    f
    • 4
    • 31
  • s

    Sam Hulick

    10/21/2021, 10:58 PM
    whoa, the
    .build
    folder can get quite huge over time 😳
    Copy code
    111.4 GiB [###########] /.build
    a
    a
    f
    • 4
    • 8
  • a

    Adrián Mouly

    10/22/2021, 2:40 AM
    Is there a way to run just the LINTER from SST?
    f
    t
    • 3
    • 9
  • m

    Muhammad Ali

    10/22/2021, 2:50 AM
    Hey everyone, I have another question. I am using dynamoDB in the backend and I want to support functionality where a user can see how many "total" replies exist for a specific post. dynamoDB doesn't provide
    count(*)
    functionality. So the only other cost effective option is to trigger kinesis stream on each insert in db and use lambda to aggregate the count. Now here are my 2 questions 1. Is this the best approach? 2. Is there an example i can use which can guide me how to setup kinesis stream on dynamodb with a target lambda?
    a
    a
    +7
    • 10
    • 25
  • d

    Dan Van Brunt

    10/22/2021, 7:57 PM
    @Frank @thdxr did this make it into a release/version? https://github.com/serverless-stack/serverless-stack/commit/d0dc25340ca83a9f19ad189e32831046c5fa02a6
    t
    • 2
    • 4
  • s

    Sam Hulick

    10/22/2021, 8:40 PM
    docs request: it would be awesome if the docs had the minimal IAM permissions needed to deploy an SST project
    b
    t
    +2
    • 5
    • 15
  • a

    arda

    10/22/2021, 8:56 PM
    hi all, is it expected that dynamo tables and cognito user pool wouldn’t be deleted with
    sst remove
    ?
    s
    f
    • 3
    • 10
  • a

    Adrián Mouly

    10/22/2021, 10:17 PM
    Somebody shared with me some documentation before about doing an SSH tunnel for MySQL connection of my local lambda… Anybody has it handy? I want to tunnel my SQL over SSH.
    t
    s
    • 3
    • 8
  • a

    Adrián Mouly

    10/24/2021, 4:26 AM
    Does SST already defines this env-var anywhere?
    Copy code
    [dotenv][DEBUG] "AWS_NODEJS_CONNECTION_REUSE_ENABLED" is already defined in `process.env` and will not be overwritten
    t
    • 2
    • 2
  • a

    Adrián Mouly

    10/24/2021, 5:32 AM
    Would be possible to add a command to clean all the “.build” folders? Like..
    sst clean
    ?
    t
    • 2
    • 4
  • d

    Dan Van Brunt

    10/24/2021, 2:19 PM
    @Frank When building a construct, assuming one that could be added to SST, is there a way to use
    sst.Function
    where you reference the assets using
    path
    like you guys do with
    lambda.Function
    ? Just trying to envision portability of a custom construct.
    t
    f
    • 3
    • 18
  • s

    Sean Matheson

    10/24/2021, 3:01 PM
    Anyone tried the Next.js construct against Blitz.js?
    f
    • 2
    • 1
  • d

    Dan Van Brunt

    10/25/2021, 8:01 PM
    @Frank I think there is a small bug with the debugger incorrectly not detecting an infrastructure change. I changed the
    copyFiles
    from
    hit save and it said no changes detected.
    Copy code
    new sst.Api(scope, 'AppAPI', {
          defaultFunctionProps: {
            bundle: {
              copyFiles: [{ from: '../../../contentful-app-frontend', to: '.' }],
            },
          },
          routes: {
            'ANY /': 'lib/constructs/ContentfulApp/lambda.handler',
            'ANY /{proxy+}': 'lib/constructs/ContentfulApp/lambda.handler',
          },
        })
    t
    • 2
    • 9
  • m

    Muhammad Ali

    10/26/2021, 3:35 AM
    Hey guys, dumb question. I am new to this javascript/typescript paradigm and one of the difficulty that i am facing is lack of autocomplete/suggestions in visual studio code. I used to use Intellij for java and it used to give hints what public fields/functions/function parameters are available/required etc. Is there anything in vscode that i can install that can give me same intellisense for SST (typescript)
    t
    r
    +2
    • 5
    • 5
  • e

    Erik Robertson

    10/26/2021, 7:02 PM
    Hello all, I'm using sequelize (with mysql, and NOT postgres) and getting the following error on deploy (it works ok locally without any bundle props) :
    Building Lambda _function_ src/list.main
    > node_modules/sequelize/lib/dialects/postgres/hstore.js:3:23: error: Could not resolve "pg-hstore" (_mark_ it _as_
    external
    to
    _exclude_ it _from_
    the
    _bundle_, _or_
    _surround_ it _with_
    _try_/_catch_
    to
    handle
    the
    failure
    at
    _run_-_time_)
    3 │ const hstore = require('pg-hstore')({ sanitize: _true_ });
    And I've tried putting the module as external_modules as recommended (and also tried node_modules) but with no success in my stack API definition:
    defaultFunctionProps: {
    bundle: {
    node_modules: ['pg-hstore'],
    // external_modules: ['pg-hstore'],
    // node_modules: ['pg', 'sqlite3', 'tedious', 'pg-hstore']
    }
    },
    Any idea ?
    t
    • 2
    • 17
  • g

    Greg Martin

    10/26/2021, 7:14 PM
    Ok. I gotta say, this looks too good to be true. We are getting our toes in the water with the sample Notes app, but are very pleased thus far. For years, I've been hearing how NoSQL is the way to go and I just cannot get my 56 year old RDB head around that idea. We deal with extraordinarily complex SQL queries and I am on about year 10 of trying to warm up to the idea that such things can be done efficiently with something as simple as key/value pairs. Every time I look into a demo, it's always a Hello World sample of DynamoDB or MongoDB and doesn't address the challenges of working with large and complex datasets with foreign keys, one to many relationships, 4th normal form, etc. But, I digress. The idea of having something like SST abstract away all of the Lambda, CodeDeploy, SQS, S3, CloudFront, DyanmoDB, etc. It's just overwhelming. Realizing that we can move forward on projects without needing to spin up, maintain, and understand EC2 Linux servers... Well, it's difficult to articulate how big a deal I think this is.
    s
    t
    j
    • 4
    • 8
  • a

    Adrián Mouly

    10/27/2021, 3:35 AM
    Is somebody using AWS Code Artifact? I want to host some private NPM packages but I don’t want to pay to NPM.COM
    t
    j
    • 3
    • 7
  • d

    Danny

    10/27/2021, 11:41 AM
    How do I get SST to build with proper sourcemaps? My stacktrace in seed.run issues are minified.
    t
    t
    • 3
    • 35
1...161718...33Latest