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

    arda

    10/12/2021, 4:26 PM
    Hi guys, i encounter an issue when loading env for my react frontend. I think i might have missed something during setup..
    Copy code
    > frontend@0.1.0 start
    > sst-env -- react-scripts start
    
    sst-env: Cannot find the SST outputs file in /Users/zhuangda/projects/notes. Make sure "sst start" is running.
    t
    • 2
    • 4
  • a

    arda

    10/14/2021, 4:12 PM
    Hi guys, I am trying to remove my stack but got this following error:
    Copy code
    ➜  notes git:(main) npx sst remove storage
    Using stage: zhuangda
    Preparing your SST app
    Transpiling source
    Linting source
    Removing zhuangda-notes-storage
    Checking remove status...
    zhuangda-notes-storage | DELETE_IN_PROGRESS | AWS::CloudFormation::Stack | zhuangda-notes-storage 
    zhuangda-notes-storage | UPDATE_COMPLETE | AWS::CloudFormation::Stack | zhuangda-notes-storage 
    
     ❌  zhuangda-notes-storage failed: Stack zhuangda-notes-storage failed to destroy: UPDATE_COMPLETE
    
    
    Stack zhuangda-notes-storage
      Status: failed
      Error: Stack zhuangda-notes-storage failed to destroy: UPDATE_COMPLETE
    
    Failed to remove the app
    t
    n
    • 3
    • 11
  • t

    Tomasz Sobczyk

    10/15/2021, 6:47 PM
    Any idea what could be causing this:
    Copy code
    apig-test --username='*****' --password='*****' --user-pool-id='us-east-1_*****' --app-client-id='*****' --cognito-region='us-east-1' --identity-pool-id='us-east-1:*****' --invoke-url='<https://570f9qril4.execute-api.us-east-1.amazonaws.com>' --api-gateway-region='us-east-1' --path-template='/notes' --method='POST' --body='{"content":"hello world","attachment":"hello.jpg"}'
    
    Results in:
    
    Authenticating with User Pool Getting temporary credentials Making API request getaddrinfo ENOTFOUND 570f9qril4.execute-api.us-east-1.amazonaws.comc
    f
    j
    b
    • 4
    • 20
  • ö

    Ömer Toraman

    10/16/2021, 6:40 PM
    Hello, trying out Serverless Stack for the first time, and enjoy reading the GUIDE ( https://serverless-stack.com/chapters/what-does-this-guide-cover.html ) :
    We think this will give you a good foundation on building full-stack production ready serverless applications. If there are any other concepts or technologies you’d like us to cover, feel free to let us know on our forums.
    I would like to add a suggestion on that that adding a React Native project as well would be great, so that the guide really becomes truly full stack application that covers all platforms. React Native would be a good choice, as it is written in JavaScript as well and built on top of React. And the guide really seems exciting and very detailed (unlike most tutorials on the Web). Great job!
    f
    j
    • 3
    • 4
  • ö

    Ömer Toraman

    10/17/2021, 2:02 AM
    The guide is written in JavaScript, wouldn’t it be better if it was written in TypeScript? Is it because that there might be users who might not know TypeScript?
    d
    • 2
    • 1
  • r

    Robin

    10/19/2021, 8:04 AM
    Hi all - first time trying out SST (thought I've been using the guide for years) and I'm blown away! (Will effuse in the general channel later) Comment on the NextJS example and tutorial: Can I suggest that we include a removal policy for the DynamoDB table. I realise it introduces a couple of lines into the code and the need for a brief explanation. But, I feel that's better than leaving a new user with an orphaned Table in their account. Happy to raise a PR if that helps. Example:
    Copy code
    import * as sst from "@serverless-stack/resources";
    import { RemovalPolicy } from "@aws-cdk/core";
    
    export default class MyStack extends sst.Stack {
      constructor(scope, id, props) {
        super(scope, id, props);
    
        // Counter table - DynamoDB
        const table = new sst.Table(this, "Counter", {
          fields: {
            counter: sst.TableFieldType.STRING
          },
          primaryIndex: { partitionKey: "counter" },
          dynamodbTable: { removalPolicy: RemovalPolicy.DESTROY }
        });
    
        // Next.js app
        const site = new sst.NextjsSite(this, "Site", {
          path: "frontend",
          environment: {
            // Pass the table details
            REGION: scope.region,
            TABLE_NAME: table.tableName
          }
        });
    
        // NextJS access perms
        site.attachPermissions([table]);
    
        // Display site URL
        this.addOutputs({
          URL: site.url
        });
      }
    }
    t
    f
    +2
    • 5
    • 24
  • j

    Jay

    10/19/2021, 6:16 PM
    Sentry users, you can now read about how to use SST in the Sentry docs as well: https://docs.sentry.io/product/integrations/cloud-monitoring/aws-lambda/#sst
    j
    • 2
    • 4
  • p

    Patrick Gold

    10/24/2021, 11:47 PM
    @thdxr - would love to pick your brain about Prisma + Aurora + SST. I have a few questions if you get a minute to reply. Thank you! 1. Are you configuring SST’s APIs to hit a local database when running
    sst start
    ? If so, how is that configured? 2. How are you handling Prisma client generation and migrations inside of a CI/CD pipeline? (I’m using Github Actions) 3. I haven’t gotten to the Prisma layer deployment yet, but anything tricky to note there?
    t
    d
    +2
    • 5
    • 84
  • j

    Jeff

    10/29/2021, 11:34 PM
    I am following the guide, and up to now, everything has worked perfectly. However, I am now to the chapter “Custom Domains for React Apps on AWS” where I am to deploy my React app using my custom domain. I have started over again from scratch, from the previous step (where I successfully deployed the API to prod using my custom domain). But every time I get the same error here. Jay said in Discourse that he thought it might be that “the exports were removed or renamed” but I cannot figure out what that means exactly. Any ideas? Stack prod-notes-api * Status: failed* * Error: Export prod-notes-api:ExportsOutputFnGetAttApiCD79AAA0ApiEndpoint389C4905 cannot be deleted as it is in use by prod-notes-frontend* Stack prod-notes-auth * Status: not deployed* Cannot convert undefined or null to object
    a
    f
    • 3
    • 7
  • s

    satish venkatakrishnan

    11/02/2021, 5:28 AM
    Hi All, New comer here !!! I am working on the Guide and in the Authorization step . I wanted to redeploy the stack. So I removed the stack using
    npm run remove
    and then I have run
    npm run start
    I am getting the following error
    Copy code
    ===============
     Deploying app
    ===============
    
    Deploying stacks
    Checking deploy status...
    dev-todoapp-todostorage | REVIEW_IN_PROGRESS | AWS::CloudFormation::Stack | dev-todoapp-todostorage 
    dev-todoapp-todostorage | CREATE_IN_PROGRESS | AWS::CloudFormation::Stack | dev-todoapp-todostorage 
    dev-todoapp-todostorage | CREATE_IN_PROGRESS | AWS::DynamoDB::Table | TodoStorageTableCD70E466
    dev-todoapp-todostorage | CREATE_IN_PROGRESS | AWS::CDK::Metadata | SSTMetadata
    dev-todoapp-todostorage | CREATE_IN_PROGRESS | AWS::S3::Bucket | UploadsBucketC4B27CC7
    dev-todoapp-todostorage | CREATE_FAILED | AWS::DynamoDB::Table | TodoStorageTableCD70E466 dev-todoapp-TodoStorage already exists
    dev-todoapp-todostorage | CREATE_IN_PROGRESS | AWS::CDK::Metadata | SSTMetadata
    dev-todoapp-todostorage | CREATE_COMPLETE | AWS::CDK::Metadata | SSTMetadata 
    dev-todoapp-todostorage | CREATE_IN_PROGRESS | AWS::S3::Bucket | UploadsBucketC4B27CC7
    Checking deploy status...
    Checking deploy status...
    Checking deploy status...
    dev-todoapp-todostorage | CREATE_COMPLETE | AWS::S3::Bucket | UploadsBucketC4B27CC7 
    dev-todoapp-todostorage | CREATE_FAILED | AWS::CloudFormation::Stack | dev-todoapp-todostorage 
    
     ❌  dev-todoapp-todostorage failed: dev-todoapp-TodoStorage already exists
    
    
    Stack dev-todoapp-todostorage
      Status: failed
      Error: dev-todoapp-TodoStorage already exists
    
    Stack dev-todoapp-my-stack
      Status: not deployed
    Cannot convert undefined or null to object
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! todoapp@0.1.0 start: `sst start`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the todoapp@0.1.0 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    a
    f
    • 3
    • 27
  • s

    Slawomir Stec

    11/02/2021, 8:41 AM
    I look into sample code from AppSyncApi construct. Shouldn't request/response templates be nested under resolverProps? For example RDS data source or HTTP: https://docs.serverless-stack.com/constructs/AppSyncApi#using-multiple-data-sources
    f
    • 2
    • 5
  • m

    Matt Bulwan

    11/05/2021, 5:18 AM
    Hi All, Has anybody perhaps had any luck with using "arm64" architecture for Lambdas? I was thinking that perhaps Api construct with its DefaultFunctionProps like below could be a place to use it (as below), but I cannot find in in any documentation. Has anybody had any insights? :
    Copy code
    import { Architecture } from "@aws-cdk/aws-lambda";
    ...
      app.setDefaultFunctionProps({
        timeout: 120,
        memorySize: 256,
        architecture: Architecture.arm64,
        ....
    r
    c
    s
    • 4
    • 12
  • j

    Jon Holman

    11/06/2021, 7:23 PM
    does sst support adding a custom domain that is hosted on a DNS provider other than Route53?
    f
    • 2
    • 3
  • j

    Jay

    11/17/2021, 6:54 PM
    We have another example thanks to @manitej. Here’s how to use Datadog to monitor the Lambda functions in your SST app. https://serverless-stack.com/examples/how-to-use-datadog-to-monitor-your-serverless-app.html It comes with a sample repo: https://github.com/serverless-stack/serverless-stack/tree/master/examples/datadog That you can try by running:
    t
    f
    +2
    • 5
    • 8
  • j

    Jay

    11/18/2021, 9:00 PM
    We have another example to add to the list. Here we show how to use Sentry to monitor the Lambda functions in your SST app. Thanks to @manitej for putting it together. https://serverless-stack.com/examples/how-to-use-sentry-to-monitor-your-serverless-app.html Here’s the sample repo for it: https://github.com/serverless-stack/serverless-stack/tree/master/examples/sentry And here’s how to try it:
    p
    s
    m
    • 4
    • 12
  • j

    Jay

    11/25/2021, 6:08 PM
    📙 Another tutorial created by @manitej! This time it’s about how to use Middy to validate the requests and responses in your serverless APIs. https://serverless-stack.com/examples/how-to-use-middy-to-validate-your-serverless-api-requests.html Here’s the sample repo for it: https://github.com/serverless-stack/serverless-stack/tree/master/examples/middy-validator You can also try it by running:
    ö
    d
    +3
    • 6
    • 18
  • t

    Tonny (sstNerd)

    12/01/2021, 8:31 AM
    Hello guys, quick question: is the guide outdated? I was just looking to the “infrastructure-as-code” link and looks like it is a
    yml
    file which I remember is the way to do on serverlessframework but now that everything is SST and CDK I guess there is another way?
    m
    f
    • 3
    • 9
  • k

    Kujtim Hoxha

    12/03/2021, 10:02 AM
    Does anyone have an example of using step functions with sst? Really appreciate it if someone can share their experience.
    o
    m
    • 3
    • 24
  • h

    Hamed Mamdoohi

    12/06/2021, 1:41 AM
    hey folks, any chance I can find an EventBridge Bus archive example with SST ? For archive, it seems like I should use the Archive construct from CDK and stitch it to my SST Bus? is that right ?
    • 1
    • 2
  • t

    Tonny (sstNerd)

    12/06/2021, 4:09 AM
    Link broken on the guide: https://serverless-stack.com/chapters/secure-our-serverless-apis.html
    j
    • 2
    • 3
  • j

    Jay

    12/06/2021, 5:00 PM
    We have 2 more examples on how to use your IDE to debug your Lambda functions with SST. • WebStorm: https://serverless-stack.com/examples/how-to-debug-lambda-functions-with-webstorm.html • IntelliJ: https://serverless-stack.com/examples/how-to-debug-lambda-functions-with-intellij-idea.html Thanks for @manitej for putting them together!
    s
    m
    • 3
    • 2
  • m

    Matt Bulwan

    12/13/2021, 8:33 PM
    Hi, Would anybody know of a documentation that covers usage of SST in projects with CICD pipelines that may require a manual test+approval action before a production deploy? Any hint for "blue/green" deployment strategy with SST? I was wondering how to best approach deployments of "Api" or "StaticSite" constructs, so that applications are partly deployed to an environment but are awaiting a final confirmation from QA teams before the Route53 zone record is finally updated to point to actual distribution of API Gateway or CloudFront, respectively.
    g
    f
    • 3
    • 7
  • n

    Noah D

    12/17/2021, 10:38 AM
    Hey when reading the guide, there is a section that talks about updating a dynamodb record with the following object, I seem to be getting the problem where If i don't include an attribute it actually gets updated to null rather than doing nothing as I would hope. Does anyone know how I would have this setup so that it only updates the attributes which I provide?
    r
    • 2
    • 14
  • m

    mkarsene

    12/18/2021, 8:11 AM
    Will there be a guide on how to use aws organisations using cdk? Or does anyone have a good package/library that does this easily?
    f
    • 2
    • 2
  • t

    Tonny (sstNerd)

    12/19/2021, 8:44 PM
    The other day I saw a reference to use SST + Gatsby but I can’t find the link anymore, idk if it was in a slack thread or somewhere in the guide but I can’t find it anymore, have anyone seen it recently?
    d
    f
    • 3
    • 11
  • j

    jamlen

    12/20/2021, 9:07 AM
    Why does the guide in the Best Practices use Serverless Framework for the backend APIs and only uses SST for the infrastructure repo? There is no rationale given for this that I can see and I'm finding it confusing since I've just been using SST for everything up until this point. Is it just to demonstrate that you can use it or is there an advantage to it? If it is just a choice thing, then on each section of the Best Practices it should show how to make it work in SST as well, as I'm wanting to follow the these best practices and build a production ready, scalable app, but have to try to decipher the yaml serverless bits.
    f
    k
    • 3
    • 13
  • j

    Jack G

    12/21/2021, 9:44 AM
    I'm learning about AWS EventBridge, I can see SST offers the EventBus construct and I was just wondering if there were any plans on implementing a guide based on it?
    f
    p
    +2
    • 5
    • 9
  • m

    Mehmet Ali SARAÇ

    12/21/2021, 4:26 PM
    Hello, everyone I'm setting my environment variable through AWS SSM and I would like to know what happens if I change the value of parameter ? does it change or the change occur in next deployment ?
    t
    • 2
    • 2
  • c

    Carlos Daniel

    01/14/2022, 8:06 PM
    Hey guys, how do you usually do to warm up SST lambdas - if there is a way to (sorry if it is a newbie question)
    r
    a
    +4
    • 7
    • 27
  • t

    Toby Harris

    01/18/2022, 5:44 PM
    Hello all, any recommendations for reference that expands the testing page of the guide? I was hoping for neat SSTesque ways to 1. test lambdas that use AWS resources (e.g. unit test CRUD persistence) 2. test end-points (e.g. integration test CRUD persistence)
    a
    f
    j
    • 4
    • 17
1234Latest