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

    Ryan Barnes

    04/19/2022, 7:22 PM
    What tool do y'all use to create your diagrams in your guides?
    j
    r
    +2
    • 5
    • 8
  • n

    Neil Balcombe

    04/26/2022, 1:12 PM
    Ok, I found the problem. I realised that all of the routing was having and issue and after some Googling, I found that it is caused by the way StrictMode works with React Router. in https://serverless-stack.com/chapters/handle-routes-with-react-router.html you need to make sure that the Router component wraps StrictMode, not the other way around.
    Copy code
    const root = ReactDOM.createRoot(document.getElementById('root'));
    root.render(
      <Router>
        <React.StrictMode>
          <App />
        </React.StrictMode>
      </Router>
    j
    • 2
    • 1
  • a

    Adam Fanello

    05/04/2022, 9:36 PM
    On https://docs.serverless-stack.com/constructs/v0/migration#upgrade-steps • Step 1, update version to no longer pull beta • Step 3a, no
    run
    after
    npx
    , just
    npx tsc --noEmit
    f
    • 2
    • 1
  • n

    Nathan

    05/06/2022, 2:55 PM
    Hi Folks. I’ve just started working with SST at our company. I’m quite a fan of CDK and this is looking very nice. Would anyone be able to guide me to best practices for working with mid size dev teams 8-12. How do we avoid constantly stepping on each other when working locally? Won’t’ we be deploying the same stack over each other? I have multiple accounts per environment. But if I try to create multiple accounts per developer, my infra costs would be massive. Some of my resources are EC2 instances. Any ideas would be wonderful.
    t
    s
    +2
    • 5
    • 15
  • a

    Adam Fanello

    05/06/2022, 10:29 PM
    Mistake in v1 migration docs: https://docs.serverless-stack.com/constructs/v0/migration#queue-changelog First bullet for Queue has copy & paste error referring to kinesisStream
    f
    • 2
    • 1
  • a

    Adam Fanello

    05/06/2022, 10:29 PM
    Missing from v1 migration docs: In
    Script
    ,
    KinesisStream
    , and
    WebSocketApi
    components,
    defaultFunctionProps
    is now
    defaults.function
    f
    • 2
    • 1
  • a

    Alex Rayo

    05/07/2022, 2:41 PM
    Hi people. Just noticing that the example repos associated with guide for things like structuring and organizing projects, and sharing code between services are like 2-3 years old. Can anyone suggest any recent repos and/or resources that demonstrate best way to use current version of SST? Or any real-world open source projects / repos that reflect current best practices? Thank you! Example of guide with old repos: https://serverless-stack.com/chapters/organizing-serverless-projects.html https://serverless-stack.com/chapters/share-code-between-services.html
    l
    t
    • 3
    • 2
  • i

    iery

    05/10/2022, 7:01 AM
    I found a typo in https://docs.serverless-stack.com/installation .
    scope
    seems to be a typo for
    stack
    . Am I right?
    Copy code
    export function MyStack({ stack }: StackContext) {
      scope.stage; // "dev"
      scope.region; // "us-east-1"
      scope.name; // "my-sst-app"
    }
    m
    f
    • 3
    • 3
  • m

    Martin Pllu

    05/10/2022, 6:25 PM
    Hey guys 👋 I started with Docs -> Installation rather than the Guide, so I created a Typescript project with
    npm init sst
    . The project uses
    @serverless-stack/resources 1.0.4
    which appears to be incompatible with some of the other docs. For example, https://docs.serverless-stack.com/api#authentication refers to
    defaultAuthorizationType
    which does not exist in the API props in this version. I found some other examples of this, for example
    cognito
    is missing from Auth props. If however I use
    npx create-serverless-stack@latest --language typescript myproject
    as per the Guide, the project uses
    @serverless-stack/resources 0.69.7
    which appears to be aligned with the Docs as well as the Guide. Can you please advise on the recommended version and command to create a new project? Unless I've missed something obvious, it may also be worth updating the docs.
    t
    f
    • 3
    • 7
  • a

    Adrian Schweizer

    05/17/2022, 11:02 PM
    I think there is an error in the migration guide here in the code block: https://docs.serverless-stack.com/constructs/v0/migration#default-settings Instead of
    Copy code
    // to
    {
      defaults: {
        functionProps: { timeout: 10 },
    it should be
    Copy code
    // to
    {
      defaults: {
        function: { timeout: 10 },
    Or at least I get a complaint in the console with the former, but not the latter setup
    f
    • 2
    • 1
  • e

    Emanuel Bohnenkamp

    05/18/2022, 12:03 AM
    Hey guys, found a typo in the API example: https://serverless-stack.com/examples/how-to-create-a-rest-api-with-serverless.html Deploying your API The command for deployment should be: npm run deploy -- --stage prod
    m
    f
    • 3
    • 5
  • k

    Kevin Grimm

    05/18/2022, 2:41 AM
    Hey crew! Jumped into the
    Deploy to S3
    section, looks like this line is outdated:
    This packages all of our assets and places them in the build/ directory.
    The Next.js docs indicate the output goes into the
    .next
    folder: https://nextjs.org/docs/deployment Could be that this is IRT a config earlier in the guide but figured I would flag regardless.
    f
    • 2
    • 2
  • r

    Richard Simpson

    05/18/2022, 6:33 PM
    It's in preview-ish still, but is there plans to update https://docs.serverless-stack.com/migrating/serverless-framework in light of CDK adding official support for importing existing resources into CDK stacks? This is the biggest thing that concerns my teams since we have a lot of a Serverless FX repos with active prod deployments, and the overheard of conversion is pretty scary.
    f
    • 2
    • 5
  • k

    Klaus

    05/21/2022, 1:01 AM
    I was looking into tagging the DebugStack the same way as the normal stack tried using key values from a
    .env
    file. While all worked as expected for my normal stack, the tags were missing in the DebugStack. The reason for that is the changed run directory during debug stack initialization, which means the environment isn't behaving as I expected.
    f
    • 2
    • 3
  • j

    Jirawat Uttayaya

    05/23/2022, 10:28 AM
    Just downloaded and tested SST last night. Liking it a lot so far. Noticed some small updates with the docs that can help first time devs/ops
    m
    f
    • 3
    • 5
  • n

    Neil Balcombe

    05/23/2022, 1:31 PM
    Off the back of a discussion about not using Cognito for auth, I'm running through the Auth0 tutorial and have come across a bug. When outputting the stack outputs,
    Copy code
    IdentityPoolId: auth.cognitoCfnIdentityPool.ref
    is not recognised. I had to change to
    IdentityPoolId: auth.cognitoIdentityPoolId ? auth.cognitoIdentityPoolId : "none",
    To get it to work correctly.
    m
    m
    • 3
    • 4
  • k

    Klaus

    05/23/2022, 7:17 PM
    @Frank @Jay Would you also be interested in a guide how to specify a custom bucket for CDK assets? This was another one of my pain points before as we might have many projects. The serverless framework allowed using 1 customizable deployment bucket for all. The current documentation covers an option for debug payloads, but not for the general CDK deployment bucket that's used for all other assets.
    f
    • 2
    • 8
  • r

    Rudi

    05/23/2022, 8:09 PM
    I tried this:
    Copy code
    export default function main(app) {
      app.setDefaultFunctionProps({
        runtime: "nodejs16.x",
        srcPath: "backend",
        bundle: {
          format: "esm",
        },
      })
    
      const storageStack = new StorageStack(app, "storage")
    
      app.stack(storageStack).stack(ApiStack)
    }
    but now get:
    Copy code
    Stacks: Building changes...
    Stacks: Synthesizing changes...
    
    TypeError: fn is not a function
        at stack (/home/rudi/projects/notes/node_modules/@serverless-stack/resources/src/FunctionalStack.ts:23:19)
        at App.stack (/home/rudi/projects/notes/node_modules/@serverless-stack/resources/src/App.ts:389:17)
        at Object.main (/home/rudi/projects/notes/stacks/index.js:19:7)
        at Object.<anonymous> (/home/rudi/projects/notes/.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)
        at internal/main/run_main_module.js:17:47
    t
    k
    • 3
    • 70
  • m

    manitej

    05/25/2022, 3:12 AM
    The demo notes app is also updated to V1, check it out: https://github.com/serverless-stack/demo-notes-app
    r
    • 2
    • 12
  • m

    manitej

    05/26/2022, 5:26 PM
    The Auth0 example has been updated to V1 and it now includes a React frontend to call APIs. 👉 https://serverless-stack.com/examples/how-to-add-jwt-authorization-with-auth0-to-a-serverless-api.html Thanks @Ashishkumar Pandey for the tips!
    a
    • 2
    • 1
  • k

    Klaus

    05/27/2022, 12:19 PM
    @Frank @thdxr I noticed problem with the documented custom configuration for Python functions https://github.com/serverless-stack/serverless-stack/blob/master/packages/resources/src/Function.ts#L471-L491 Pip seems to expect not just the indexes, but also a command
    f
    • 2
    • 5
  • p

    p0wl

    05/27/2022, 12:24 PM
    Hey, we are running our full production setup on AWS-CDK without SST currently. We’re very interested into using SST for development, but would not want to touch our production setup. Is there a guide how to / is anyone using SST for development only, but using “pure” aws-cdk for production?
    k
    f
    • 3
    • 5
  • t

    Tonny (sstNerd)

    05/28/2022, 7:11 AM
    I’m getting troubles getting started with the Apollo guide, https://serverless-stack.com/examples/how-to-create-an-apollo-graphql-api-with-serverless.html Looks like the config changed recently and playground is not longer supported.
    f
    s
    • 3
    • 9
  • m

    Mischa Spiegelmock

    05/28/2022, 8:35 PM
    how do you pass vars like cognito user pool, appsync url, etc from serverless infra to nextjs? is this the best way to do it? https://docs.serverless-stack.com/constructs/NextjsSite#environment-variables are there any helpers for reading in the vars or should i make my own?
    f
    • 2
    • 2
  • m

    Mischa Spiegelmock

    05/28/2022, 11:15 PM
    starter repo linked here is 404 https://docs.serverless-stack.com/advanced/monorepo-project-structure
    f
    • 2
    • 6
  • m

    manitej

    05/30/2022, 4:14 PM
    New week, new example! React + SST + Facebook OAuth 🔥 sst full https://serverless-stack.com/examples/how-to-add-facebook-login-to-your-cognito-user-pool.html
    t
    f
    • 3
    • 3
  • n

    Neil Balcombe

    05/31/2022, 2:51 PM
    Folks, a quick heads-up that the postgres example has quite a few issues. I've fixed a few along the way but now I'm into type errors within KyselyTypeGenerator.js. It looks like the base setup has been changed to typescript but the rest of the content hasn't.
    f
    • 2
    • 12
  • b

    Bob Wall

    05/31/2022, 4:58 PM
    Copy code
    // Show the endpoint in the output
      stack.addOutputs({
        BucketName: bucket.bucketName,
      });
    f
    • 2
    • 1
  • j

    Jan Nylund

    06/05/2022, 12:04 PM
    Howdy! I’m new on SST, coming from Serverless Framework and now considering if I should go with SST or pure CDK. One thing I’m wondering about is how SST sees the difference of monolith lambdas vs microservice? I couldn’t find any comments on it in the documentation. My aim is to primarily code in python. So if I wanna deploy say 5 different functions, is there a nice structure on how to manage this to get separate requirements.txt files for them etc? Or am I overocmplicating things.
    f
    • 2
    • 14
  • t

    Tony J

    06/09/2022, 4:12 AM
    https://serverless-stack.com/chapters/dynamically-generate-social-share-images-with-serverless.html Hi! Quick question about this guide. Since there is a cloudfront distribution with TTL of a year. There is no need to save the captured images to an s3 bucket right? Without the s3 component but with the same cloudfront configuration it would get run once, image would be captured on the fly and returned, and the result would be cached by cloudfront for a year so the api would never trigger again for the same social card request? Or is there something I'm missing? Just wondering because this guide is great and we're going to use it but the s3 + cloudfront felt like doing the same thing twice in terms of permanent caching
    f
    • 2
    • 1
1234Latest