https://serverless-stack.com/ logo
Join Slack
Powered by
# help
  • f

    Francis Menguito

    05/18/2022, 9:37 AM
    @Edward Asquith so anything that’s not the simple data types can be done directly on Dynamo?
    r
    e
    • 3
    • 4
  • w

    Willian Medeiros

    05/18/2022, 12:20 PM
    Hello, is there a way to increase build timeout of seed.run ?
    f
    • 2
    • 7
  • a

    Adrian Schweizer

    05/18/2022, 1:24 PM
    With this customDomain setup, my app deployment hangs after deploying the Api Stack:
    Copy code
    customDomain:
             app.stage === "prod" ? {
                isExternalDomain: true,
                domainName: "<http://api.mydomain.com|api.mydomain.com>",
                cdk: {
                   certificate: new Certificate(stack, "apicert", {
                      domainName: "<http://api.mydomain.com|api.mydomain.com>",
                      validation: CertificateValidation.fromDns(),
                   }),
                },
             } : undefined,
    t
    f
    • 3
    • 36
  • d

    David Garcia

    05/18/2022, 2:03 PM
    Hey, is there some setup needed to get React Testing Library working on a sst react app?
    t
    d
    • 3
    • 5
  • o

    outaTiME

    05/18/2022, 6:45 PM
    Hi guys, after the migration to SST 1.x (1.1.1) I am getting the following warnings on the screen and they are quite annoying, one of the solutions could be to apply a null coalescence, but I don’t want to mess up my code, any recommendations? (I’m using plain javascript)
    t
    f
    • 3
    • 27
  • s

    Sam Hulick

    05/18/2022, 6:57 PM
    how can I set a function base path for a bunch of routes in a
    sst.Api
    ? so I don’t have to do:
    Copy code
    'GET /folders': 'lambda/rest/functions/get-folders.main',
      'GET /global-search': 'lambda/rest/functions/global-search.main',
      'GET /tags': 'lambda/rest/functions/get-tags.main',
      'GET /trash': 'lambda/rest/functions/get-deleted-items.main',
    way back in the early days of SST, I wrote a messy helper function to handle this for me. but now I need to get rid of that as it’s.. well, a mess, and there’s probably a better way now 🙂
    r
    o
    +2
    • 5
    • 16
  • r

    Ross Coundon

    05/18/2022, 7:39 PM
    I need to revisit this issue. I’ve now refactored a reasonably complex stack into 13 small stacks. Everything builds correctly but when I deploy I’m getting the same error as I started this thread with for every resource - “Resource of type ‘AWS:SQS:Queue’ with identifier ‘x-y-omw-pso-be-sst-planBroadcastEventDlq’ already exists.” This happens when not setting an
    id
    on the stack and when setting a different ID on each stack I also tried setting the same ID on each stack which I figured would fail and it did. What’s the right way to do this?
    r
    o
    +2
    • 5
    • 33
  • s

    Sam Hulick

    05/18/2022, 10:04 PM
    💥 I’ve got a critical issue going on with 1.1.2. things were fine in 1.0 beta 7, but now one of my functions is throwing this error (see in thread)
    t
    f
    • 3
    • 24
  • j

    João Pedro

    05/19/2022, 2:42 AM
    hey guys - having a bit of a problem after updating to 1.1.2. I was trying to bring the same naming so that I don’t have to tear down the environments we’ve got. So I have this:
    Copy code
    app.stack(MainStack, { stackName: 'main-stack' })
    then I get this message:
    Stack "main-stack" is not parameterized with the stage name. The stack name needs to either start with "$stage-", end in "-$stage", or contain the stage name "-$stage-".
    so I change to this as per instructions:
    Copy code
    app.stack(MainStack, { stackName: '$stage-main-stack' })
    then I get this message:
    Stack name must match the regular expression: /^[A-Za-z][A-Za-z0-9-]*$/, got '$stage-main-stack'
    so not sure what am I expected to do here
    t
    o
    r
    • 4
    • 7
  • j

    John Stephen Soriao

    05/19/2022, 4:38 AM
    May I ask for some guidance on this. I'm using sst v1.1.0 typescript amd64
    s
    f
    • 3
    • 4
  • s

    Sparsh Rawat

    05/19/2022, 7:54 AM
    Hey Guys ! Seed is taking too much time to deploy some are in progress since morning(IST), any idea what to do ? I have tried reconnecting again but the issue still persists.
    a
    e
    f
    • 4
    • 10
  • f

    Francis Menguito

    05/19/2022, 8:20 AM
    Hey guys, I’m getting this error:
    Copy code
    Stack francis-alloy-one-StorageStack
      Status: failed
      Error: francis-sst-one-orders already exists
    Is there a way that it wont error everytime I start and stop my SST?
    o
    t
    g
    • 4
    • 26
  • m

    Mohiuddin Sumon

    05/19/2022, 8:50 AM
    So I ran - npx sst start and project boots up, how should I run this next time, running npx sst start will again try to create stack/resources and will throw resource exist error . UPDATE: in my stack I am creating dynamodb table, How can I check if table exist and skip if it exist ? Thanks
    r
    f
    t
    • 4
    • 14
  • c

    Ciak

    05/19/2022, 8:59 AM
    Hi Guys, I wanted to report a bug in DynamoDB Table class of SST: When you override the default table name by setting
    dynamodbTable.tableName
    , that table will not be removed in case of
    sst remove
    or when removing the table from the stack. Did anyone experienced the same?
    o
    t
    • 3
    • 7
  • s

    Shubham Sinha

    05/19/2022, 1:08 PM
    Just scaffolded a new project and upon npm start I'm not getting API endpoint. Let me know if more details are required
    m
    b
    • 3
    • 8
  • t

    T Indie

    05/19/2022, 2:25 PM
    Hi everyone and thanks for this amazing tool and community, just wondering if there exists a structured boilerplate with the best patterns for a Rest API with RDS (Postgres) that one can use as a reference. I already using the kysely-data-API ORM mentioned by @thdxr (https://serverless-stack.slack.com/archives/C01JG3B20RY/p1648520392937399?thread_ts=1648517936.338399&amp;cid=C01JG3B20RY) My my main pain-points are how to make functions reusable, validations, mapping from underscore to camelcase for fields and reducing the amount of copy-paste I am doing for each route 😄 not to mention testings etc. Much thanks
    t
    • 2
    • 7
  • g

    Geoff Seemueller

    05/19/2022, 5:15 PM
    Trying to figure out how to control access to specific routes on my API using Cognito groups but I'm not getting anywhere with the AWS docs. Anyone have any good recommendations on how to achieve this?
    f
    • 2
    • 6
  • s

    Shubham Sinha

    05/19/2022, 5:26 PM
    Which folders need to be added to .gitignore apart from node_modules, .vscode, .env ?
    r
    o
    f
    • 4
    • 4
  • d

    Dan Van Brunt

    05/19/2022, 6:18 PM
    Help! We’re having odd APIG issues where one function is triggering but the other is not. They both
    CF -> APIG -> Lambda
    but only the first one hits the authorizer and function the other only logs out in APIG but never beyond that. This WORKS
    POST /api/event/submit
    This does NOT
    GET /api/event/submit-prev
    This is the behaviour to point traffic to the api from cloudfront
    Copy code
    cfDistribution.addBehavior('/api/event/*', new cfOrigins.HttpOrigin(eventApiDomain), {
      allowedMethods: cf.AllowedMethods.ALLOW_ALL,
      viewerProtocolPolicy: cf.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
      cachePolicy: cf.CachePolicy.CACHING_DISABLED,
      compress: false,
    })
    f
    • 2
    • 2
  • r

    Robert

    05/19/2022, 6:24 PM
    Anyone ever had problem with the console not working after a
    sst start
    ? I can
    sst build
    my app no problem, I can also run
    sst start
    without error, but when I hit the console then I have a bunch of error in the network tab 😕
    f
    j
    t
    • 4
    • 30
  • s

    Shubham Sinha

    05/19/2022, 6:28 PM
    I need help structuring the stacks. I am using go for lamda functions Following this https://serverless-stack.com/chapters/review-our-app-architecture.html article I created StorageStack to create DynamoDb table and S3 bucket. Now I want to use the table in my functions and for doing that I need to pass table name ( https://serverless-stack.com/examples/how-to-use-dynamodb-in-your-serverless-app.html ) how to I get access to the table defined in StorageStack in ApiStack ? Should I move table instantiation to ApiStack itself ?
    t
    m
    a
    • 4
    • 8
  • t

    Trey Overton

    05/19/2022, 7:11 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
    • 11
  • t

    Trey Overton

    05/19/2022, 7:13 PM
    The "Migrate to v1.0" docs say you can "optionally" adopt Functional stack. However, when I attempt to use the class-based mechanism to extend Stack, I get a build error of:
    Copy code
    TypeError: import_sst.MojoStack is not a constructor
    Is using the functional version not optional after all?
    t
    d
    f
    • 4
    • 15
  • g

    Giorgio Galante

    05/19/2022, 9:54 PM
    hey folks, is there a development guide for working on sst itself? I'd like to help add .NET 6 lambda's supported (currently AFAIK only .NET 3.1 is supported right now) - I've pulled down the source, poked around a bit and would like to test my changes, but I don't have a clue how to test my code.
    f
    • 2
    • 16
  • r

    Rudi

    05/19/2022, 10:50 PM
    Hi, beginner question ... As there's a limit of 5 targets with Event Bridge, is it more preferable to use SNS -> SQS -> Lambda, rather than EB -> SQS -> Lambda ? I'm thinking the 5 target limit could be an issue as the application grows.
    t
    d
    • 3
    • 20
  • d

    Dan Coates

    05/20/2022, 2:07 AM
    Hi all, I know similar questions have been asked a couple of times in here but I'm a bit stuck on getting
    chrome-aws-lambda
    and puppeteer working with local sst start. I've tried various combinations of bundle options including
    nodeModules
    and
    externalModules
    and
    copyFiles
    but nothing seems to work and the
    nodeModules
    and
    copyFiles
    settings seem to have no effect on what ends up in the artifact file when running via
    sst start
    . I've also tested out the example at https://github.com/serverless-stack/serverless-stack/tree/master/examples/layer-chrome-aws-lambda and get the same error of
    Cannot find module 'chrome-aws-lambda'
    If I remove
    chrome-aws-lambda
    from the
    externalModules
    setting then there is a different error
    Cannot find module ...<path omitted>/backend/functions/puppeteer/lib/Browser
    The readme in the example makes it seem like it should work with
    sst start
    but it doesn't seem to.
    o
    m
    +2
    • 5
    • 18
  • b

    Bshr Ramadan

    05/20/2022, 5:39 AM
    Hello, I am migrating to v1 and moving from
    js
    stacks to
    ts
    when set a function env variable to a process env var, I am getting this type safety error:
    Copy code
    Type 'string | undefined' is not assignable to type 'string'.
    I can put it like so:
    Copy code
    environment: {
      var: process.env.var || ''
    }
    but In case I forgot to set an env var, I want it to be
    undefined
    and throw error in building time to notice it. So how can I get rid of this type of error?
    m
    r
    +2
    • 5
    • 12
  • h

    Hans Song

    05/20/2022, 6:00 AM
    hey guys, when i try to query a DynamoDB table with filters, i get an error:
    Copy code
    Invalid KeyConditionExpression: Attribute name is a reserved keyword; reserved keyword: key
    m
    f
    • 3
    • 19
  • n

    Neil Hynes

    05/20/2022, 10:04 AM
    Hi folks, SST beginner here! I’m working on a stack with 2 cron jobs in it, one for an api keep-warm lambda and the other for a timing test lambda. I’d like these to run in dev, but not in local. I can handle this in the lambdas by checking for
    process.env.IS_LOCAL
    and returning to abort the lambdas, but it’d be even nicer to have the crons not run at all. Is there a way to add a rule to the cron job definition not to run if
    process.env.IS_LOCAL
    is set?
    a
    r
    +2
    • 5
    • 31
  • m

    Miguel

    05/20/2022, 10:37 AM
    Hi I’m trying to debug my API with visual studio code. I have followed the doc and created the corresponding
    launch.json
    entry and all. The deployment and updating lambda function on save works, however my breakpoints are
    Unbound
    on VS code and can’t seem to get them to work. Any ideas? My api handler functions are in
    go
    , in case it matters. Edit: I can confirm that creating another route handled by a
    ts
    handler it does indeed hit the breakpoint 🤷‍♂️
    f
    • 2
    • 3
1...727374...83Latest