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

    Seth Geoghegan

    02/24/2021, 9:01 PM
    I have a similar setup to the demo-ext example (separate repos for API and infrastructure). I've converted my infrastructure repo to SST, and it works great! i'd like to try converting a portion of my API to use SST, so I'm brainstorming how I want to resolve the cross stack resources.
    f
    p
    +2
    • 5
    • 11
  • n

    Nicola Brisotto

    03/23/2021, 10:51 PM
    Hello, I’m trying to move our API from serverless to SST. I don’t find an alternative to invoke lambda locally with mock data like we can do with serverless ( see here https://serverless-stack.com/chapters/invoke-lambda-functions-locally.html ). I know we can use
    sst start
    but that way I have to hit the API Gateway manually (or with a custom automation). So, as far as I can see, there isn’t a 1 to 1 alternative to
    serverless invoke local
    , am I right?
    f
    m
    • 3
    • 83
  • m

    Maks Babarowski

    03/27/2021, 11:12 PM
    Hi. I'm following the guide to build front-end app for my Serverless API and I think I'm missing something out... At that point where I'm supposed to shot my first request using Amplify API class, I'm told to do it in that kind of manner
    Copy code
    <http://API.post|API.post>("notes", "/notes", {
        body: note
      });
    However, API Gateway response for it is 401. I assumed Amplify takes care of appending authorization headers, JWT and whatever since it handles Cognito user pool authorization. Yet in the Amplify docs , it says one needs to explicitly add Bearer token to the request to perform JWT authorization. Did I miss something following your guide?
    j
    c
    • 3
    • 13
  • j

    Jay

    06/02/2021, 8:05 PM
    I added an example on how to use Lambda Layers and SST to create a serverless screenshot service. Check it out! https://serverless-stack.com/examples/how-to-use-lambda-layers-in-your-serverless-app.html
    t
    • 2
    • 3
  • j

    Jay

    06/04/2021, 7:37 PM
    I just wrote an example for using MongoDB with SST. Thanks to @Mr.9715 for the suggestion! https://serverless-stack.com/examples/how-to-use-mongodb-in-your-serverless-app.html
    t
    • 2
    • 1
  • l

    Luca Demmel

    06/16/2021, 11:12 AM
    Hey 🙂 Is there a guide / open sourced example of a monorepo using lerna / yarn workspaces & SST already?
    a
    f
    • 3
    • 12
  • j

    Jay

    06/22/2021, 6:15 PM
    I added an example on how to create a simple click counter with React. It uses the new `sst.StaticSite` construct. And the backend is an API with DynamoDB. Check it out! https://serverless-stack.com/examples/how-to-create-a-reactjs-app-with-serverless.html
    j
    • 2
    • 3
  • j

    Jay

    06/29/2021, 7:13 PM
    Last week we wanted to create better social media share images for Serverless-Stack.com. We wanted to generate them dynamically. So we decided to build this in serverless using SST! The entire thing is publicly available on GitHub (https://github.com/serverless-stack/social-cards). We also added a chapter going over the details of how we built it and how it integrates with our static sites. The gist of it is that we create HTML templates that are loaded locally in a Lambda function. It takes screenshots of these using Puppeteer and caches it in S3. We also add CloudFront in front of it with a custom domain. Check out all the details here. https://serverless-stack.com/chapters/dynamically-generate-social-share-images-with-serverless.html
    a
    a
    j
    • 4
    • 18
  • j

    Jose Cobian

    07/14/2021, 3:34 PM
    @Jay Hi there my name is Jose and I am learning how to build web apps with your model on Serverless stack. It is the best model online for building a Serverless app bar none. Do you have any tutorials on building up the scratch app into a CRM?
    j
    • 2
    • 2
  • a

    Adrián Mouly

    07/19/2021, 2:43 AM
    Is there any guide on how to run SST + SLS on the same repo, in a way that I can start creating new-services with SST while continue having SLS for old ones? any recommendations?
    r
    f
    • 3
    • 4
  • t

    Tom Bensimhon

    07/19/2021, 8:01 AM
    Hi, can anyone help me on how to add an existing SNS topic as a destination for my function onFailure property? I've tried defining a topic using existing ARN
    Copy code
    const topic = new Topic(app, "slack-lambda-logs-1", {
        snsTopic: {
          topicName: "slack-lambda-logs",topicArn:"arn:example:topic"
        },
      });
    f
    • 2
    • 10
  • r

    Ross Coundon

    07/22/2021, 2:02 PM
    Today I found that one of my developers had gone down a bit of a rabbit hole. I'd asked him to look into migrating one of our existing app backends from serverless framework to SST. I discovered a few days later that he'd clicked the button on the serverless-stack.com homepage labelled 'Read the Guide' thinking it would take him to a guide about SST. Instead this took him to the fullstack app tutorial on serverless framework ( a great guide, but not the one he needed) If he'd clicked on the button next to it that's labelled 'Get Started' instead, he would have saved himself (and me) 3.5 days of wasted time and confusion. I therefore think that the homepage needs to do a better job of segregating the older serverless framework stuff out from the new sexy SST stuff.
    a
    f
    +3
    • 6
    • 12
  • j

    Jay

    07/28/2021, 9:22 PM
    We added a couple of new chapters to the extra credit section of the guide. A good introduction of AWS AppSync, for anybody that’s looking to learn about it. https://serverless-stack.com/chapters/what-is-aws-appsync.html We are also starting a new section on how to handle authentication in serverless. With an overview chapter: https://serverless-stack.com/chapters/how-to-add-authentication-to-a-serverless-app.html And one on using Cognito in SST and connecting to it in a React app. https://serverless-stack.com/chapters/using-cognito-to-add-authentication-to-a-serverless-app.html We also have a example repo to go with it: https://github.com/serverless-stack/serverless-stack/tree/master/examples/react-app-auth-cognito We’ll be covering a bunch of other auth providers in the weeks to come!
    t
    • 2
    • 3
  • a

    Adrián Mouly

    08/03/2021, 9:15 PM
    Is there any guide on how to use HTTP API proxy? Looking to have something like a “public api” exposed to the front-end and then this API should talk to each individual micro-service APIs… Looking for a guide / guidance on this.
    s
    s
    +2
    • 5
    • 58
  • a

    Ashishkumar Pandey

    08/18/2021, 7:45 AM
    We need a guide about IAM policy generation. It should be an umbrella guide with some examples and other guides. One of the guides that it could refer should be - https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-generation.html
    f
    • 2
    • 4
  • j

    Jack G

    08/24/2021, 11:02 AM
    Hi peeps, am I right in thinking that a lot of the guide on the sst website is stale?
    a
    d
    f
    • 4
    • 7
  • j

    Jay

    08/26/2021, 7:31 PM
    Good news everyone! The Serverless Stack Guide has now been updated to use SST 🎉 https://serverless-stack.com/#guide We build a note taking app as a part of the guide. https://demo.serverless-stack.com It’s a full-stack serverless app with a CRUD API backend and React.js frontend. All deployed to AWS via SST. You can check out the source for the app here. https://github.com/serverless-stack/demo-notes-app We also have a separate Serverless Framework version. https://serverless-stack.com/chapters/setup-the-serverless-framework.html Here’s the source for it. https://github.com/AnomalyInnovations/serverless-stack-demo-api Over the next few days we’ll be emailing out the new ebook version. But if you want to get it right away, just DM me and I’ll send you the link. PS: Here’s the announcement on Twitter. Would appreciate it if you like and RT it! https://twitter.com/ServerlessStack/status/1430973896623370244
    t
    a
    +4
    • 7
    • 13
  • a

    Aram

    09/02/2021, 1:48 PM
    There is some confusion in the docs here https://docs.serverless-stack.com/constructs/Topic#importing-an-existing-topic
    Copy code
    import { Topic } from "@aws-cdk/aws-sns";
    
    new Topic(this, "Topic", {
      subscribers: ["src/subscriber1.main", "src/subscriber2.main"],
      snsTopic: Topic.fromTopicArn(this, "MySnsTopic", topicArn),
    });
    the
    new Topic
    is referencing
    Topic
    from
    sst
    and the
    Topic.fromTopicArn
    is referencing
    Topic
    from
    aws-sns
    but both of them have the same variable name in the code
    f
    • 2
    • 1
  • m

    Muhammad Ali

    09/09/2021, 6:05 PM
    I am creating a discussion forum type app for my learning. There will be a table called "threads" and then "threads_comments". One of the objective i have is to keep a count of total "comments" from "thread_comments" into "threads". How would i do that? I can think of few approaches 1. Whenever a thread_comment is added, the same lambda can update the thread.total_replies count. The problem is that if multiple lambdas are doing the same thing, they may end up writing a wrong count 2. Use dynamodb triggers (? not sure whats the technical term here). Whenever a thread_comment is added, a message is posted in a queue and that queue can be used to update the thread table. would prefer if i can batch up the queue processing based on thread_id . 3. Probably use a cron job. which would run every 5 minutes, scan the tables which have been changed in last 5 minutes and do a scan of them and count the replies. Is there any better approach?
    r
    f
    • 3
    • 12
  • c

    Clayton

    09/09/2021, 9:13 PM
    Trying to better understand some of SSTs unit test functionality. In the guide’s section on unit tests, it utilizes a
    test(…)
    function that doesn’t seem to be imported/created anywhere within the code. I haven’t done much JS testing, so perhaps this is something basic I don’t know about yet. What is providing this global
    test
    function something - is via SST or something else? Thanks
    a
    t
    +2
    • 5
    • 32
  • c

    Clayton

    09/10/2021, 2:47 PM
    Is anyone using Svelte with SST yet? I’m trying to connect a Svelte frontend via the
    StaticSite
    construct and curious how to connect env variables – • Do you still need to leverage the `@serverless-stack/static-site-env`` package? • How are you calling env vars within Svelte files - do you need to connect them via an exported props first? Thanks
    t
    f
    • 3
    • 17
  • s

    Stan

    09/10/2021, 6:44 PM
    Hello! I'm reading through the guide, particularly interested in organizing multi-microservice serverless application in monorepo. In the chapter https://serverless-stack.com/chapters/organizing-serverless-projects.html it seems that you are proposing to use single serverless.yml per each service (billing-api, notes-api, notify-job). Do you have any thoughts or recommendations how to achieve the same using SST only?
    a
    • 2
    • 10
  • m

    mathewgries

    09/12/2021, 4:16 PM
    Trying to get a better understanding of how I should be setting up my userIds in my lambda functions https://serverless-stack.com/chapters/secure-our-serverless-apis.html https://serverless-stack.com/chapters/cognito-user-pool-vs-identity-pool.html https://serverless-stack.com/chapters/mapping-cognito-identity-id-and-user-pool-id.html The guide uses the federated identity vs the User pool userid, but links to ways of using the user pool instead if that is what you want. One question I have is, what would be a driving decision on using one vs the other? I know the guide tries to break it down, but it’s not exactly clear on why you would decide on one vs the other aside from “if that is what you want”. So, why would I want to use the Userpool user id vs the federated identity is my question
    f
    • 2
    • 7
  • a

    Ambati Srinivas

    09/24/2021, 1:10 PM
    Could you share some documents to learn how the serverless stack application starts? (In nodeJs, Typescript)
    t
    • 2
    • 3
  • t

    Tomasz Sobczyk

    09/24/2021, 8:30 PM
    Yo! @Frank - spotted today that that if I follow the sst guide (with default language - javascript), when I try to deploy the whole thing for the first time i get this (after running npx sst start): Cannot find app handler. Make sure to add a "stacks/index.ts" file.
    t
    • 2
    • 19
  • n

    Nguyen giang nam

    09/26/2021, 1:40 PM
    Hi evevybody, i want setup Gitlab CICD to deploy aws. So in my file gitlab-ci.yml . What commands does it need?
    f
    • 2
    • 2
  • j

    Jay

    09/30/2021, 7:54 PM
    We added a doc on how to use the common monitoring services (Datadog, Sentry, Epsagon, & Lumigo) with SST. Check it out and let us know if there are any other ones we should cover. https://docs.serverless-stack.com/monitoring-your-app-in-prod
    n
    t
    +5
    • 8
    • 20
  • j

    Jay

    10/01/2021, 6:11 PM
    We added another doc talking about the workflows for using SST with your team. We documented the three most common patterns and their various tradeoffs in security, complexity, and safety. Check it out and let us know what we should write about next! https://docs.serverless-stack.com/working-with-your-team
    b
    • 2
    • 2
  • j

    Joseph Dan Alinsug

    10/05/2021, 6:14 AM
    Hey guys, do we have any Korean version of the docs for sst?
    j
    • 2
    • 3
  • d

    Devin

    10/07/2021, 9:14 PM
    In the guide there’s a pattern for API stack where we make a few stacks. The middle stack is API which we pass along to frontend stack as a config
    Copy code
    new FrontendStack(app, "frontend", {
        api: apiStack.api, // here
        auth: authStack.auth,
        bucket: storageStack.bucket,
      })
    With nextjs do we just move all those handlers up to the
    pages/api
    and it just works?
    j
    • 2
    • 2
1234Latest