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

    Sam Frampton

    09/17/2021, 4:37 PM
    Does sst queue construct support fifo property? Can't see it in the docs
    f
    • 2
    • 6
  • t

    thdxr

    09/18/2021, 4:52 AM
    Functional stack definition, just return the exports. Then each stack can specify what it depends on instead of having to coordinate in
    main
    and everything is called in the right order. All fully typed. Basically dependency injection, inversion of control, insert buzzword here
    f
    a
    d
    • 4
    • 4
  • t

    thdxr

    09/18/2021, 8:28 PM
    wow I figured out how to deal with those "cannot remove export issues". You can manually deploy stacks in a different order so that the one you updated gets updated first
    sst deploy <stack>
    a
    s
    • 3
    • 6
  • a

    Adrián Mouly

    09/19/2021, 7:56 PM
    Does SST support API construct to be connected to SQS directly?
    o
    f
    • 3
    • 21
  • j

    Jack Fraser

    09/19/2021, 8:20 PM
    Is it possible to create a API Gateway custom domain via the SST Api method that would replace the serverless
    create_domain --stage [stage]
    command? Seem to be able to do it but it creates
    EndpointType
    as
    REGIONAL
    instead of
    EDGE
    @Frank
    f
    • 2
    • 5
  • a

    Adrián Mouly

    09/19/2021, 11:00 PM
    Reaching 20 SST/CDK stacks today, moved like 10 from SLS 🙂 .
    t
    • 2
    • 7
  • a

    Adrián Mouly

    09/20/2021, 5:01 AM
    Dummy question… when I run
    sst remove --stage xxx
    … how it know which stages has to remove? it compiles my current code to get the existing stages “in code”? or calls CF to pull existing stacks? Asking this because sometimes I modify an stack-name locally, but on AWS there is still the same stack with other name. What would happen in that situation? is going to remove my old stack or not?
    t
    • 2
    • 3
  • a

    Adrián Mouly

    09/20/2021, 12:44 PM
    How you guys define names on your stacks and components? I usually define a “name prefix” variable at the beginning of my stack, with the namespace like
    ${scope.stage}-${scope.name}-project
    … where
    project
    is the name of the feature that I want to build. Then when creating a Dynamo table, for example, I do this:
    Copy code
    tableName: `${namePrefix}-myCoolTable`,
    But well, it’s a little boilerplate to do this on every Construct instance. What others are doing?
    t
    • 2
    • 3
  • c

    Clayton

    09/20/2021, 4:45 PM
    Trying to add a default removal policy in a TypeScript SST project and getting this error. I’m still pretty green in using TS. Am I missing something basic to get this to work?
    lib/index.ts
    Copy code
    export default function main(app: <http://sst.App|sst.App>): void {
    
      if (app.stage === "dev") {
        app.setDefaultRemovalPolicy(RemovalPolicy.DESTROY);
      }
    
    ...
    error
    Copy code
    Property 'setDefaultRemovalPolicy' does not exist on type 'App'.
    t
    • 2
    • 8
  • t

    thdxr

    09/20/2021, 8:12 PM
    Anyone using this NestedStack concept, came across it the other day
    a
    f
    • 3
    • 4
  • m

    mathewgries

    09/21/2021, 2:39 AM
    Trying to add secondaryIndex with a projection type of INCLUDE and add the NonKeyAttributes as well. Is there more in-depth documentation on structuring objects in sst or anything that explains how to do this properly (if it even can be done). This is what I am trying, but it is throwing an error on the projectionType field 35:29 error ‘ProjectionType’ is not defined no-undef
    f
    • 2
    • 13
  • j

    Joel Corona

    09/21/2021, 2:36 PM
    Hi there, has anyone used postman with cognito (IAM), to make request?
    m
    • 2
    • 4
  • s

    Sam Frampton

    09/21/2021, 9:41 PM
    I can't see this in docs is there an sst command similar to serverless comand
    sls info -verbose
    to view stack outputs of urls, & arns etc
    f
    s
    • 3
    • 4
  • l

    luke

    09/22/2021, 12:44 PM
    Any plans to introduce EventBridge event tailing? Would be cool to have the option to see events in
    sst start
    logs. Similar idea here https://www.boyney.io/blog/2021-09-06-debug-eventbridge-with-postman.
    t
    h
    • 3
    • 2
  • r

    Ross Coundon

    09/22/2021, 2:01 PM
    I wonder if anyone has tried to similar and whether this warrants a breaking change in the SST API when using TypeScript😬 I want to be able to push a set of functions into an array and then do some common stuff to them, for example, adding some common permissions. So I try to define my array like:
    const someFunctionList: Function[] = [];
    but this gives the linting error
    Copy code
    Don't use `Function` as a type. The `Function` type accepts any function-like value.
    It provides no type safety when calling the function, which can be a common source of bugs.
    So what I've done instead is to import Function via an alias
    import { Function as SSTFunction } from '@serverless-stack/resources';
    and used
    const someFunctionList: SSTFunction[] = [];
    t
    • 2
    • 4
  • d

    David Martin

    09/22/2021, 7:16 PM
    A few times per day, my local SST debug sessions crash. Does anyone else have this problem?
    Copy code
    fatal error: all goroutines are asleep - deadlock!
    
    goroutine 1 [semacquire]:
    sync.runtime_Semacquire(0x0)
            runtime/sema.go:56 +0x25
    sync.(*WaitGroup).Wait(0xc00000e010)
            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 4 [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 5 [chan receive]:
    main.(*serviceType).sendRequest(0xc000064190, {0x13f20a0, 0xc032732690})
            <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
    • 12
  • j

    Joel Corona

    09/22/2021, 10:10 PM
    Hi there, this error is frequent when I make requests, for some reason it stops working and the time out error appears in the lambda, is there any parameter that I should add or any configuration so that this error does not occur?
    t
    f
    • 3
    • 14
  • a

    Adrián Mouly

    09/24/2021, 4:33 AM
    Question… My stacks has lot of dependencies on SSM, due I’m storing some VPC IDs and references to other systems… etc… So I was thinking that maybe I can add an script or check at the beginning of my
    index
    which can check if all my SSM vars are defined in the current account/environment. I need this due I have currently 3 totally different AWS accounts (dev, stage, prod), so I need to manually configure each SSM instance by hand. Thoughts?
    t
    f
    • 3
    • 10
  • a

    Adrián Mouly

    09/24/2021, 4:57 AM
    Is there a way to add Tags to my SST Stacks? I just found that from CF Console.
    f
    • 2
    • 1
  • m

    Muhammad Ali

    09/25/2021, 2:33 AM
    Hi, I want to create a lambda function which would be called after user signs up via cognito. which means this function wouldn't be tied to any rest api. I couldn't find any example of creating a function using sst stack (or perhaps i missed). Can anyone point me to the document or help how to write this funciton.
    c
    j
    • 3
    • 6
  • d

    Dan Van Brunt

    09/25/2021, 4:03 PM
    Any thoughts on chances of moving SST to support
    yarn v2
    ? We’re thinking of making the move and I think in order to support it, there may only need to be some changes to how SST implements packages like eslint internally. They may not be a need to actually use yarn v2 in SST itself. Also, lots of great things in it if you did.
    o
    s
    t
    • 4
    • 17
  • j

    Joel Corona

    09/27/2021, 2:54 PM
    Hi there, I updated to the latest version and I still get the lambda timed out error.
    f
    • 2
    • 2
  • r

    Ross Coundon

    09/27/2021, 10:23 PM
    I'm a little hesitant to put this out there as I need to do more digging but I wanted to mention it in case there's something inherently wrong with what I'm trying to do. I have an SST application that’s initially deployed via Seed. I thought by running
    sst start
    locally and specifying the same stage name that's in Seed it should allow me to ‘take over’ that application and route the API calls to my local code. Then, when I'm done, I could kick off the deploy in Seed to remove the debug stack. However, after doing this, all requests immediately fail when running from the Seed deployed version with HTTP 500. I don't think it's even getting as far as hitting the integrated lambdas. If I then run
    sst start
    for that stage locally it works again. I've also noticed that I have multiple lambdas by the same name in the account now, I'm wondering if this approach has led to things getting duplicated - haven't proven that yet, that's a job for tomorrow. As I say, I need to do some more investigation in the morning but wanted to mention it in case there's something inherently wrong with what I'm trying to do.
    t
    • 2
    • 37
  • b

    Blake E

    09/28/2021, 7:08 PM
    Hey, so I’m working with
    sst.NextjsSite
    and
    sst start
    worked well (including the cool
    sst-env
    shim). I’m looking to deploy this in
    ca-central-1
    but now that I’m done, I’m deploying and getting the following error:
    Copy code
    username-mysite-frontend-website | UPDATE_FAILED | AWS::CloudFront::Distribution | SiteDistribution390DED28 Resource handler returned message: "Invalid request provided: The function must be in region 'us-east-1'. ARN: arn:aws:lambda:ca-central-1:1234:function:username-mysite-fronten-SiteMainFunction123-YYZ:3 (Service: CloudFront, Status Code: 400, Request ID: ABC, Extended Request ID: null)" (RequestToken: ABC, HandlerErrorCode: InvalidRequest)
    I thought maybe it was the cloudfront distribution, which I’ve tried to disable, still now joy - any pointers?
    Copy code
    // Create a Next.js site
        const site = new sst.NextjsSite(this, 'Site', {
          path: 'nextjs',
          cfDistribution: {
            enabled: false,
          },
          environment: {
            // Pass the table details to our app
            REGION: scope.region,
            API_URLS: Fn.select(0, apiUrls),
          },
        })
    f
    t
    • 3
    • 11
  • j

    Jack Fraser

    09/28/2021, 8:46 PM
    When moving from Serverless framework to SST the
    event.requestContext.authorizer.*
    becomes
    event.requestContext.authorizer.lambda.*
    when using a
    ApiAuthorizationType.CUSTOM
    - is this due to payloadFormatVersion - and is there a way round it? @Frank
    t
    a
    • 3
    • 30
  • e

    Erik Robertson

    09/29/2021, 3:04 PM
    Newbie needs help.... I have simply followed instructions to install the rest-api example using
    npx create-serverless-stack@latest --example rest-api sst-test2
    and then cd and do npm run start it deploys the debug stack and then fails beore deploying the app stack saying:
    Cannot find app handler. Make sure to add a "lib/index.js" file.
    There is indeed no such file in the sample. There is a stacks folder instead which is being referred to in sst.json. Is /lib' a hardcoded dependency??
    r
    t
    +2
    • 5
    • 16
  • j

    Joe Kendal

    09/29/2021, 3:17 PM
    The Next.js construct is very cool and is the reason we decided to give SST a try. Whilst we cannot thank the team enough for their contribution to the community, something must be said of the 800+ line file that it is put in. It would be easier for the community to extend, debug and maintain if it were broken down into smaller constructs instead of just one big 800 line class.
    f
    • 2
    • 2
  • j

    Jack Fraser

    09/29/2021, 5:46 PM
    What is the recommend way to only have some of your stacks in dev (websocket) mode for development? We have quite a few stacks (around 12) but only really interested in running 1 or 2 in debug at any one time?
    t
    a
    • 3
    • 10
  • a

    Adrián Mouly

    09/29/2021, 9:22 PM
    Hey guys, I want to use Lambda@Edge to read my user’s country, I’m trying to deploy a function as described here, but can’t get it to work: https://docs.serverless-stack.com/constructs/StaticSite#using-lambdaedge
    f
    • 2
    • 30
  • l

    Lukasz K

    09/30/2021, 5:02 AM
    @Jay / @Frank / @thdxr Just wanted to take a break from work and thank you guys for the awesome job your team is doing with this project 🙂 As we're moving into more and more complex usecases in my stack I just can't stop and admire how easy it is with SST's help (Node calling Python calling AWS CLI to move mountains in S3 with multiple lambda layers on top and fancy builders? EASY PEASY!) So once again, great job. Cheers!
    j
    • 2
    • 1
1...131415...33Latest