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

    JJ Teoh

    12/24/2021, 3:38 AM
    Is there a way to set environment variable in
    sst.Queue
    ?
    Copy code
    const queue = new sst.Queue(this, queueName, {
          consumer: 'src/queueConsumer.main',   // this handler expects a secret from env var
        })
    f
    a
    • 3
    • 4
  • d

    Davide Ungari

    12/26/2021, 10:10 PM
    I'm having troubles deploying my SST app on SEED... Locally it builds and deploy successfully on Seed I get this generic error:
    Copy code
    Building Next.js site frontend
    Error: There was a problem building the "site" NextjsSite.
        at NextjsSite.buildApp (/tmp/seed/source/node_modules/@serverless-stack/resources/src/NextjsSite.ts:607:13)
        at new NextjsSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/NextjsSite.ts:148:16)
        at new MainStack (/tmp/seed/source/stacks/MainStack.ts:21:18)
        at Object.main (/tmp/seed/source/stacks/index.ts:5:3)
        at Object.<anonymous> (/tmp/seed/source/.build/run.js:94:16)
        at Module._compile (internal/modules/cjs/loader.js:1063:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
        at Module.load (internal/modules/cjs/loader.js:928:32)
        at Function.Module._load (internal/modules/cjs/loader.js:769:14)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    Error: Subprocess exited with error 1
        at ChildProcess.<anonymous> (/tmp/seed/source/node_modules/aws-cdk/lib/api/cxapp/exec.ts:127:23)
        at ChildProcess.emit (events.js:315:20)
        at ChildProcess.EventEmitter.emit (domain.js:467:12)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
    There was an error synthesizing your app.
    Any idea how to debug what is going on?
    d
    f
    +2
    • 5
    • 38
  • m

    Mischa Spiegelmock

    12/28/2021, 12:47 PM
    is it possible to get esbuild to emit a “metafile” for my function? (like this)
    t
    • 2
    • 6
  • s

    Sam Hulick

    12/28/2021, 11:37 PM
    feature request: in the new SST console, it would be great if the invocation body didn’t get cleared every time we invoke a function
    t
    j
    • 3
    • 14
  • d

    Davide Ungari

    12/29/2021, 12:17 AM
    I think I finally drilled down the issue with SST and SEED deploy a NextJS webapp. SEED's pipeline is executing:
    Copy code
    ====================
    🛠 Compile
    ====================
    $ cd /tmp/seed/source
    INFO: before_compile hook not found. You can define it in your build spec.
    INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
    INFO: Looking for package.json...
    $ npm install
    34.90 s
    ====================
    🧪 Unit Test
    ====================
    INFO: Unit tests are disabled. You can enable them in the app settings.
    INFO: Learn more about running tests - seed.run/docs/running-tests
    ====================
    📦 Build
    ====================
    $ cd /tmp/seed/source
    INFO: before_build hook not found. You can define it in your build spec.
    INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
    $ npx sst build --stage develop --region eu-west-1 --verbose
    But the
    npx sst build
    is not running
    npm install
    also in the NextJS sub-folder so it is missing the
    next
    executable and this failure appears in the log like:
    Copy code
    Building Next.js site frontend
    Error: There was a problem building the "site" NextjsSite.
    What is supposed to be the build process for SST apps based on NextjsSite?
    j
    j
    • 3
    • 13
  • g

    Guy Shechter

    12/29/2021, 6:05 AM
    I keep running into an issue when deploying a project for the first time in a new account. I have a stack that creates a Route53 hosted zone, another stack that creates an API with a custom domain and a ReactSite with a custom domain. During the build step, the API and ReactSites throw the error below because the Hosted Zone is not yet instantiated.
    Copy code
    It seems you are configuring custom domains for you URL. And SST is not able to find the hosted zone "<http://qa.mydomain.com|qa.mydomain.com>" in your AWS Route 53 account. Please double check and make sure the zone exists, or pass in a different zone.
    thoughts?
    d
    j
    f
    • 4
    • 21
  • s

    Sam Hulick

    12/30/2021, 4:49 AM
    is there any way we could get some level of expansion instead of
    [Object]
    ? like maybe 5-6 levels deep, maybe? (in the SST console)
    t
    f
    +3
    • 6
    • 16
  • a

    Adrián Mouly

    12/30/2021, 4:05 PM
    Hey guys. I would like to publish my deployment outputs from CDK/SST into Slack, once the deployment finishes. I can do this in many ways, but I was thinking to use SST somehow when the process finishes, and using the Slack API do publish the results. Is the “script” construct designed to do this kind of things? Thanks.
    d
    t
    • 3
    • 33
  • s

    Seth Geoghegan

    12/30/2021, 4:23 PM
    I'm tearing down a stack using
    npm sst remove
    and it's been stuck in the
    DELETE_IN_PROGRESS
    stage for about 18 minutes while trying to remove the resources related to the SST.Script construct.
    d
    t
    • 3
    • 8
  • s

    Samir Baid

    12/30/2021, 4:41 PM
    Hey guys, with SST lambda cold start (in debug mode) takes too much time... Is there a plugin like serverless-optimize available for SST?
    t
    d
    f
    • 4
    • 23
  • a

    Alistair Stead

    12/30/2021, 7:45 PM
    Has anyone used
    turborepos
    with SST? I’ve been using it on a number of projects and it brought lots of benefits both for dev and CI. I’ve been working with it on an SST project and NextJSSite but it has highlighted a number of complexities/diversions from practices in other projects. It would be great to be able to use this or other such solutions to speed up the build step for NextJSSites currently it is built twice on every deploy. Could SST leverage the build hashes to prevent this? Also the
    cwd
    during the build process and also the loading of additional next and eslint config causes some issues or at least confusion and I can’t find a way to resolve this.
    d
    s
    • 3
    • 9
  • a

    Alistair Stead

    12/30/2021, 7:46 PM
    It would be great to be able to build a site that is not in a subdirectory of SST. It would also be good to be able to define a build command as you can in StaticSite.
    f
    g
    s
    • 4
    • 9
  • g

    gio

    01/03/2022, 9:35 AM
    About
    npx sst update 0.56.0
    . I expect an update to my project folder and my package.json, but package.json keep old version 0.52.0. Am I using in properly way this command?
    Copy code
    $ npx sst update 0.56.0
    Updating @serverless-stack/cli to 0.56.0
    Updating @serverless-stack/resources to 0.56.0
    Updating @aws-cdk/aws-ses@1.126.0
    Updating @aws-cdk/aws-ses-actions@1.126.0
    Updating @aws-cdk/aws-stepfunctions@1.126.0
    Updating @aws-cdk/aws-stepfunctions-tasks@1.126.0
    SST: 0.52.0
    CDK: 1.126.0
    f
    t
    • 3
    • 17
  • a

    Adam Fanello

    01/04/2022, 4:14 PM
    👋 Hi. Looking for support for SQS ReportBatchItemFailures (https://github.com/aws/aws-cdk/issues/17690). It isn't in CDK 1.132, but is in 1.137. (Can't tell when exactly it was added.) Of course it's in some version of CDK v2 as well and I'm happy to make that upgrade with the new SST version that supports it. Not urgent, but having it in the next couple of weeks would be great.
    f
    • 2
    • 2
  • p

    Phil Astle

    01/04/2022, 5:53 PM
    Just been looking at the new console and I like it - nice work guys! A couple of related suggestions though... On the local tab it would be useful to see the stack the invoked function was from. For example, we have a Lambda_GET_-- entry and in order to work out which stack it's from you have to click on the item to navigate to the function entry. We have ~22 stacks so it's not always obvious which one it's from and it'd be nice to not have to keep navigating backwards and forwards. The related issue is that it might be useful to see the stack name in the function detail pane too. At the moment, you have to scroll up the navbar to see which stack it's from, which can be a bit of a pain if your stack has lots of functions. Hopefully both easy UI only tweaks to change (if you agree!) 🙂
    t
    • 2
    • 3
  • s

    Sean Matheson

    01/05/2022, 9:00 AM
    Howdy all, I just jumped back on after the holidays and was excited to try out the console. I am getting an error on load.
    Copy code
    TypeError: Cannot read properties of undefined (reading 'routes')
        at index.a7e2d5b4.js:formatted:223
        at vendor.b5a71c7d.js:formatted:27543
        at GC (vendor.b5a71c7d.js:formatted:27473)
        at GC (vendor.b5a71c7d.js:formatted:27479)
        at mMe (vendor.b5a71c7d.js:formatted:27444)
        at Object.tt.retry [as queryFn] (index.a7e2d5b4.js:formatted:218)
    p
    m
    t
    • 4
    • 44
  • d

    Daniel Gato

    01/05/2022, 9:18 AM
    Guide feedback
    m
    • 2
    • 5
  • d

    Daniel Gato

    01/05/2022, 10:17 AM
    Still trying to finish the guide. After adding a custom domain and deploying to production, I can’t restart SST. Error in thread
    g
    t
    • 3
    • 26
  • r

    Ross Coundon

    01/05/2022, 10:30 AM
    A feature in CDK that we really need has been added in v1.138.0 (this one) I don't want to distract from the move to CDK v2 but wondered if there was a possibility of a bump to this version of CDK before the v2 work was complete
    f
    m
    • 3
    • 4
  • r

    Ross Coundon

    01/05/2022, 2:51 PM
    We're trying to run a lambda locally via
    sst start
    which references the sharp library. It's on a Windows platform, we've tried specifying the sharp dependency in
    bundle.nodeModules
    (and in
    bundle.externalModules
    ) but we're getting the error when the function runs:
    Copy code
    Uncaught Exception      {"errorType":"Error","errorMessage":"\nSomething went wrong installing the \"sharp\" module\n\nCannot find module '../build/Release/sharp-win32-x64.node'\nRequire stack:\n- C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js\n- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\utils\\UserFunction.js\n- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\index.js\n- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\bin\\index.js\n\nPossible solutions:\n- Install with the --verbose flag and look for errors: \"npm install --ignore-scripts=false --verbose sharp\"\n- Install for the current runtime: \"npm install --platform=win32 --arch=x64 sharp\"\n- Consult the installation documentation: <https://sharp.pixelplumbing.com/install>","stack":["Error: ","Something went wrong installing the \"sharp\" module","","Cannot find module '../build/Release/sharp-win32-x64.node'","Require 
    stack:","- C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js","- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\utils\\UserFunction.js","- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\lib\\index.js","- C:\\dev\\omw-pso-be\\node_modules\\@serverless-stack\\aws-lambda-ric\\bin\\index.js","","Possible solutions:","- Install with the --verbose flag and look for errors: \"npm install --ignore-scripts=false --verbose sharp\"","- Install for the current runtime: \"npm install --platform=win32 --arch=x64 sharp\"","- Consult the installation documentation: <https://sharp.pixelplumbing.com/install>","    at node_modules/sharp/lib/sharp.js (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:39896:13)","    at __require (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:38:44)","    at node_modules/sharp/lib/constructor.js (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:39909:5)","    at __require (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:38:44)","    at node_modules/sharp/lib/index.js (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:43471:17)","    at __require (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:38:44)","    at Object.<anonymous> (C:\\dev\\omw-pso-be\\.sst\\artifacts\\f79e38b8\\src\\main\\handler\\omw\\getOmwResponse.js:75153:31)","    at Module._compile (internal/modules/cjs/loader.js:1085:14)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)","    at Module.load (internal/modules/cjs/loader.js:950:32)"]}
    How should we go about specifying this for
    sst start
    ?
    t
    • 2
    • 7
  • r

    Ross Coundon

    01/05/2022, 2:53 PM
    One thing that would be helpful for
    sst start
    now that the service builds the function code on 1st run, some feedback in the console to say this is happening. E.g. Compiling function xxx for first invocation... and then Compilation of function xxx completed At the moment it's not clear if anything is happening and if the function has a lot of dependencies, it can take a while and as a developer you don't know if anything is going on.
    t
    • 2
    • 1
  • s

    Seth Geoghegan

    01/06/2022, 2:32 PM
    I've enjoyed learning about the opinionated monorepo example for Typescript apps. Is there an analogous example for python floating around?
    t
    h
    • 3
    • 11
  • d

    Daniel Gato

    01/06/2022, 6:07 PM
    I’m a bit lost with the guide. When we come to the Best Practices section, it starts speaking about template.yml and uses the
    serverless
    command. Are the best practices for the Serverless Framework or for SST? This is specially confusing as the Best Practices chapter comes before Serverless Framework chapter
    d
    f
    +2
    • 5
    • 7
  • m

    Manuel Villafañe

    01/06/2022, 8:19 PM
    Hello community, good afternoon, I come with a question and I hope you can help me. Is it possible to work with a project in sst totally and absolutely locally? I am having severe performance issues while developing as it behaves extremely slow 😰
    f
    t
    • 3
    • 6
  • c

    colin

    01/07/2022, 3:29 PM
    Looking for an assist here - when upgrading SST for some reason my typescript jest tests all broke. Seems something with the hoisting of mock functions is going on… Made a repo to reproduce the issue just run
    npm test
    and tests will fail where as they work on version
    0.43.3
    repo: https://github.com/colin-h/sst-jest-bug
    t
    • 2
    • 3
  • s

    Seth Geoghegan

    01/07/2022, 3:55 PM
    I've noticed a new behavior (bug?) when running SST locally that causes the live lambda dev environment to crash. It doesn't happen all the time, but when it does, it's always when I modify and save a file in my project (a python app). I just re-run
    sst start
    again, which seems to do the trick, but this behavior is new to me. I'm on SST 0.56.2
    Copy code
    Error: Unable to evaluate guard 'cond' in transition for event 'done.invoke.(machine).building:invocation[0]' in state node '(machine).building':
    Cannot read property 'length' of undefined
        at StateNode.next (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:587:17)
        at StateNode.transitionLeafNode (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:454:26)
        at StateNode._transition (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:547:19)
        at StateNode.transition (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/StateNode.js:818:32)
        at /Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/interpreter.js:706:28
        at Object.provide (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/serviceScope.js:12:16)
        at Interpreter.nextState (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/interpreter.js:705:34)
        at /Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/interpreter.js:108:31
        at Scheduler.process (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/scheduler.js:69:7)
        at Scheduler.schedule (/Users/sgeoghegan/dev/knock-attribution-service/node_modules/xstate/lib/scheduler.js:48:10)
    
    error Command failed with exit code 1.
    info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
    t
    • 2
    • 10
  • a

    Adam Fanello

    01/07/2022, 4:19 PM
    Missing feature or bug? The
    sst update
    and
    sst add-cdk
    commands are incompatible with NPM (and yarn?) Workspaces. These sst commands need to be run from the package with sst, but with workspaces all NPM commands must be run at the workspace level (with the -w option to specify the target package).
    t
    • 2
    • 12
  • d

    Drew

    01/07/2022, 7:01 PM
    I have a Lambda that I do not want SST to wrap in the stub/webhook function. How do I set a lambda to be ignored?
    t
    • 2
    • 3
  • y

    Yeltrah

    01/09/2022, 5:41 AM
    How I’m releasing a NextJs site using SST and I have it working well. The only thing is even though I set region to
    us-east-1
    I notice the CDK formation and the S3 sitebucket are created in
    eu-west-1
    which must be the default region I set for the AWS CLI. How can I ensure that the CDK + S3 and really all related services for that deployment are all created in the same region?
    m
    t
    • 3
    • 10
  • y

    Yeltrah

    01/09/2022, 11:30 AM
    Hey. I am now trying to release to a different region with different domain and certificate, where the first release I did worked fine for
    us-east-1
    . So I’m using the following command
    sst deploy "--stage" "master" "--region" "eu-west-1"
    and I have a AWS certificate ARN in
    eu-west-1
    . I’m also setting the REGION to
    eu-west-1
    and I can see this is all set properly. However during the deployment I see the following error
    Error: Distribution certificates must be in the us-east-1 region and the certificate you provided is in eu-west-1.
    Is there another place or config where this needs to be set so that it deploys to the
    eu-west-1
    region and not the
    us-east-1
    as it appears to be doing based on the error.
    o
    • 2
    • 5
1...232425...33Latest