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

    Adrián Mouly

    06/07/2021, 10:01 AM
    Hello guys. Is there any example/documentation or anybody can provide ideas on how to re-use an API Gateway from SST? For example I have 2 Serverless Framework projects that use the same GW base path. Like.. Service one uses
    /tasks
    and service 2 uses
    /tasks/{id}/responses
    … Currently what I do is exporting the GW ID into CF from a parent SLS project and re-using that ID on the child projects (service 1 and 2). How is this pattern supposed to be done on SST? Should I have 1 parent-stack and somehow reuse it from my 2 child projects? I’m in the process of investigating what is needed to migrate my infrastructure from SLS to SST.
    f
    m
    • 3
    • 16
  • f

    Frank

    06/09/2021, 7:13 AM
    For folks using VSCode, it’s been brought up that when
    sst start
    prompts:
    Copy code
    Press ENTER to redeploy infrastructure
    Pressing ENTER doesn’t do anything as VSCode’s
    DEBUG CONSOLE
    tab does not accept user input. You should be able to get around this by setting
    "console": "integratedTerminal"
    . Here’s the full launch.json. This will start the debugging console under the
    TERMINAL
    tab in VSCode. And user input are accepted there. ^Let me know if there is a better way to accept input from the
    DEBUG CONSOLE
    tab.
    r
    • 2
    • 2
  • r

    Ross Coundon

    06/11/2021, 10:38 AM
    I think I must be doing something stupid here but I just can't see it. I have a stack that I'm trying to run locally. My sst.json looks like:
    Copy code
    {
      "name": "some-name",
      "stage": "local",
      "region": "eu-west-2",
      "lint": true,
      "typeCheck": true
    }
    I have a file in the root of the application named
    .env.local
    In the docs here it says that the app should load the env vars in that file because my stage is local. However, this doesn't happen. If I console log
    process.env
    inside my stack definition ts file, none of the vars are there. What am I missing?
    f
    • 2
    • 14
  • s

    Sakar

    06/11/2021, 12:47 PM
    hi, ran the test app, but when i want to remove it using [ npm run remove ] my S3 bucket and CloudFormation stack is not removed. I had to delete it manually in AWS . How to remove it completely?
    f
    • 2
    • 5
  • o

    Oleksii

    06/11/2021, 1:22 PM
    Hi guys, there seems to be some kind of mismatch between local stack and real stack regarding permissions for Dynamodb. Somehow during the local development process the lambda handlers have access to the Dynamodb table without explicitly attached permissions, obviously the code doesn't work after deploying the stack to AWS. Is there any config to prevent this behavior? Thanks!
    t
    s
    f
    • 4
    • 6
  • s

    Sakar

    06/12/2021, 2:10 PM
    Hi, can you help, how to create a stack for an exciting DynamoDB.
    r
    m
    • 3
    • 6
  • m

    Mike McCall

    06/12/2021, 2:30 PM
    I'm trying to add edge lambda to the the static site construct, but it looks like default behavior cannot be modified because an origin needs to specified. There is no way to reference the s3 origin of the static site in the cfN config. Doesn't look like you can modify default behavior either.
    f
    • 2
    • 34
  • s

    Sakar

    06/13/2021, 9:46 AM
    How to set permissions to a table.
    f
    • 2
    • 6
  • a

    Adrián Mouly

    06/14/2021, 6:13 AM
    Is somebody using Epsagon with SST projects?
    r
    • 2
    • 17
  • s

    Sakar

    06/14/2021, 10:14 AM
    IS there a good DynamoDB ORM tool that goes well with SST?
    r
    • 2
    • 4
  • a

    Adrián Mouly

    06/15/2021, 1:49 AM
    Regarding stacks… what is the best practice for creation? Should I have 1 stack for each of my functions? or 1 stack for each of my services/apis?
    g
    t
    f
    • 4
    • 10
  • a

    Adrián Mouly

    06/15/2021, 2:15 AM
    I’m just starting to migrate from SLS to SST… I’m using YARN + LERNA, and now having this issue when running `yarn sst build`:
    Copy code
    /Users/.../tasksApi/lib/TasksApiStack.ts
      0:0  error  Parsing error: Cannot read file '/users/.../node_modules/@serverless-stack/cli/tsconfig.json'
    
    /Users/.../tasksApi/lib/index.ts
      0:0  error  Parsing error: Cannot read file '/users/.../node_modules/@serverless-stack/cli/tsconfig.json'
    Looks like is not able to find the tsconfig from the root node_modules?
    f
    j
    • 3
    • 11
  • a

    Adrián Mouly

    06/15/2021, 3:20 AM
    Question about Authorizers…. I have an existing SLS project which creates my
    custom authorizer
    , now I want to reference it from my SST stack, is there any example on how to do that?
    Copy code
    const authorizer = new HttpLambdaAuthorizer({
          authorizerName: "LambdaAuthorizer",
          handler: new Function(this, "Authorizer", {
            handler: "src/authorizer.main",
          }),
        });
    Maybe I can specify the ARN somehow?
    j
    f
    • 3
    • 3
  • a

    Adrián Mouly

    06/15/2021, 4:27 AM
    Sorry for sending too many questions, but I’m trying to migrate my project structure from SLS to SST and can’t find examples or recommendations. My current SLS structure is…
    Copy code
    services
    - apiGateway -> defines root for /tasks + custom authorizer function -> this uses REST API
    - tasksApi -> defines functions for /tasks + references API GW defined above from CF resources
    - surveyApi -> defines functions for /tasks/{id}/surveys + references API GW defined above from CF resources
    So my idea is to migrate these 3 projects into 3 separated SST projects / stacks.
    Copy code
    services
    - main -> defines MainStack -> contains the API root + Authorizer
    - tasksApi -> defines TasksApiStack -> contains functions + references MainStack (how?)
    - surveyApi -> defines SurveyApiStack -> contains functions + references MainStack (how?)
    Is there any recommendation or best practices on how to do this? Should I use this structure of separated services, or should I move into 1 single SST project with many-stacks?
    f
    • 2
    • 30
  • r

    Ryan

    06/15/2021, 1:27 PM
    Hi! 🙂 I'm testing out a simple stack with an SPA (Static Site) and Rest API. It's freakin' awesome. Just one thing that is slowing me down... currently when I run
    sst start
    it builds the SPA each time and the whole process takes a while. I have a few questions: • Is there a way to
    sst start <stack>
    ? Usually I am working on the frontend locally and don't want to bother building it (which takes forever) • Can the Static Site skip building if there are no changes to the source? • Should I have the frontend / backend in separate Apps, rather than separate stacks? Then I can just manually start the backend one. (But also means I need to do multiple deployments and start scripting it and... it feels like a workaround) • Is there a guide for how to structure a project and general guidelines of when to split stacks and apps? It seems quite different to serverless framework...
    r
    f
    • 3
    • 8
  • o

    Oleksii

    06/16/2021, 1:19 PM
    hey guys, I am getting the following error:
    Error: The domain name needs to be in lowercase
    I see that in version 0.17 a new check has been added to enforce the domain name format. But in our case, we are using the SSM parameter to construct the domain name, so the
    domainName
    attribute has the value:
    name.${Token[TOKEN.153]}
    is there a workaround for this error?
    f
    k
    • 3
    • 9
  • s

    Sakar

    06/16/2021, 2:55 PM
    Hi, is there a example code for Angular Static-Site construct?
    f
    • 2
    • 2
  • t

    thdxr

    06/16/2021, 3:03 PM
    When deploying, should I expect to see package.json in the lambda function upload? I'm getting the following error seemingly out of nowhere:
    Copy code
    Could not find module root given file: \"internal/modules/cjs/loader.js\". Do you have a `package.json` file? "
    • 1
    • 1
  • s

    Sakar

    06/19/2021, 8:10 AM
    @Frank how to send email using nodemailer and handlebars. How to config SST ?
    r
    f
    • 3
    • 12
  • s

    Sakar

    06/20/2021, 11:05 AM
    @Frank Let me know how to config a exciting s3 bucket and use it in side my lambda to read and write files.
    f
    • 2
    • 2
  • r

    Ross Coundon

    06/21/2021, 11:59 AM
    I'm looking to get on board with the new HTTP API and I've noticed the deployment behaviour is a bit different to the old REST API. With REST API I get a base URL that is suffixed with the stage. i.e. https://123lkjnd1.execute-api.eu-west-2.amazonaws.com/dev whereas with the HTTP API it's just https://123lkjnd1.execute-api.eu-west-2.amazonaws.com Is this an SST or CDK thing, or is this how HTTP APIs deployed in general? If the latter, what's the best practice for managing different stage deployments?
    s
    f
    • 3
    • 28
  • d

    Drew

    06/22/2021, 10:01 PM
    CDK/SST question, our Cloudformation template has too many parameters. We can only have 200 parameters. We have ~66 Lambdas, and each Lambda gets 3 parameters. That puts us over the limit. How do we consolidate our parameters?
    f
    d
    • 3
    • 9
  • b

    Brinsley

    06/23/2021, 8:04 AM
    General question around mixed Lambdas: I’m currently working on a project where an application makes use of Lambdas written in TypeScript and C#, is it possible to define a stack for the C# Lambdas using TypeScript? My initial thinking is to have a stack each for the TS and C# Lambdas and then another stack that references the resources defined by those two stacks. Am I crazy? Is there a better way of doing this?
    t
    f
    • 3
    • 11
  • m

    Michael Wolfenden

    06/23/2021, 10:43 PM
    Spelling mistake
    j
    • 2
    • 1
  • r

    Rupali Lande

    06/25/2021, 9:44 AM
    Hello , can anyone help me with example , how to use DAX in serverless application ?
    f
    • 2
    • 6
  • t

    thdxr

    06/25/2021, 1:04 PM
    Hello I am Dax
    a
    • 2
    • 1
  • r

    Ross Coundon

    06/25/2021, 10:22 PM
    I came across swc today - a superfast TypeScript compiler written in rust and tried it out, and it is superfast. It got me wondering would it be possible for SST to use it, or perhaps offer the option. It could speed up builds considerably if type checking wasn't required. I.e. in our development cycle, we catch all typescript type related errors prior to the deployment step anyway, so having the swc option could mean much faster builds. This article is where I came across it.
    f
    t
    • 3
    • 9
  • s

    Sakar

    07/01/2021, 5:57 AM
    @Frank Hi, how can we use AWS AppConfig integration with Lambda extensions in SST. Please give an code example.
    a
    f
    • 3
    • 4
  • g

    gio

    07/01/2021, 8:31 AM
    Is it possibile to make a condition on which client redirect to local environment or which redirect to remote environment? When development is made by two developers the local live development could be messy. Could be nice to find some solution to isolate the redirection.
    a
    b
    +2
    • 5
    • 14
  • t

    thdxr

    07/01/2021, 2:17 PM
    The local lambda spins up a new node process for every invocation
    r
    f
    • 3
    • 13
1...567...33Latest