https://serverless-stack.com/ logo
Join SlackCommunities
Powered by
# help
  • f

    Fazi

    02/10/2022, 12:53 PM
    Any way to fix the issue above without moving to v2 of the CDK stack (got too many dependencies atm)? I am using SST version 0.42.1
    r
    f
    • 3
    • 3
  • d

    Devin

    02/10/2022, 2:02 PM
    My understanding of how API works is
    Copy code
    this.api = new sst.Api(this, "Api", {
          customDomain: {
             hostedZome: <http://myCoolSite.com|myCoolSite.com>,
             domainName: <http://api.myCoolSite.com|api.myCoolSite.com>,
             domainAlias: <http://www.api.myCoolSite.com|www.api.myCoolSite.com>,      
          }),
    Will create an A record in route53 so you can request that api as
    <http://api.myCoolSite.com|api.myCoolSite.com>
    . then if you wanted to access that in a front end
    Copy code
    const reactApp = new sst.ReactStaticSite(this, "ReactSite", {
          path: "frontend",
          environment: {
            REACT_APP_API_URL: this.api.url,
    My expectation was that
    this.api.url
    would return
    <http://api.myCoolSite.com|api.myCoolSite.com>
    . Is that the expected behavior?
    f
    • 2
    • 5
  • n

    Nicklas Nyegaard

    02/10/2022, 2:42 PM
    Hey hey, I can see that the question has been asked before but not answered, so I will try my luck 🙏 I am trying to get debugging working in VSCode with Python, but it doesn't work with the example on the website. So I am wondering if there is something else I need to do?
    t
    j
    +2
    • 5
    • 9
  • m

    Michael Bannon

    02/10/2022, 4:21 PM
    Hi guys when I run 'npm start' from this chapter https://serverless-stack.com/chapters/create-a-new-reactjs-app.html I am receiving this error in the terminal:
    > frontend@0.1.0 start C:\Users\peter\OneDrive\Documents\Michael Final Year\2021.2022\greenfinger\frontend
    sst-env -- react-scripts start
    sst-env: Cannot find matching SST environment outputs in C:\Users\peter\OneDrive\Documents\Michael Final Year\2021.2022\greenfinger\.build\static-site-environment-output-values.json. E nsure the StaticSite points to C:\Users\peter\OneDrive\Documents\Michael Final Year\2021.2022\greenfinger\frontend npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! frontend@0.1.0 start:
    sst-env -- react-scripts start
    npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the frontend@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: npm ERR! C:\Users\peter\AppData\Roaming\npm-cache\_logs\2022-02-10T16_09_41_140Z-debug.log
    a
    t
    +2
    • 5
    • 13
  • d

    Dan Van Brunt

    02/10/2022, 7:23 PM
    Does this really mean, “No
    sst.Buckets
    in this app”? cause I’m sure there is a bucket… just that its a
    cdk.Bucket
    t
    j
    f
    • 4
    • 9
  • g

    Greg

    02/10/2022, 8:59 PM
    hello wonderful sst community 🙂 I've been looking through github issues and slack threads, so I guess the answer is NO I will try just in case. Our client has a relatively huge IAC in Terraform. We would like to introduce SST to them but in an incremental way. Is there any way to do this?
    s
    f
    • 3
    • 2
  • j

    J. T. Garcia

    02/10/2022, 11:01 PM
    Hi team. I've lost linting and type checking in Typescript since upgrading SST. I've noticed that it happens starting in version 0.54.0. I also started getting the same issue here after upgrading https://github.com/serverless-stack/serverless-stack/issues/662
    f
    • 2
    • 4
  • j

    Justin Robinson

    02/11/2022, 10:35 AM
    @Frank We are moving from serverless framework to serverless-stack. In serverless framework in offline the lambda can be triggered by post requests which are auto generated. How do you trigger a lamda directly when debugging it in serverless-stack?
    f
    j
    • 3
    • 5
  • d

    Daniel Gato

    02/11/2022, 1:27 PM
    I keep getting
    Copy code
    Oops! Something went wrong! :(
    
    ESLint: 8.7.0
    
    ESLint couldn't find the plugin "@typescript-eslint/eslint-plugin".
    
    (The package "@typescript-eslint/eslint-plugin" was not found when loaded as a Node module from the directory "/Users/daniel/Github/arify-serverless".)
    
    It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    
        npm install @typescript-eslint/eslint-plugin@latest --save-dev
    
    The plugin "@typescript-eslint/eslint-plugin" was referenced from the config file in ".eslintrc.json » eslint-config-serverless-stack".
    
    If you still can't figure out the problem, please stop by <https://eslint.org/chat/help> to chat with the team.
    Is that something I’m missing?
    f
    • 2
    • 16
  • b

    Bshr Ramadan

    02/11/2022, 3:26 PM
    Hello, I am trying to add 
    aws lambda power tuning
     using cdk like here: https://github.com/alexcasalboni/aws-lambda-power-tuning/blob/master/README-DEPLOY.md#option-3-deploy-the-aws-sar-app-with-aws-cdk after adding it, the sst console is keeping stuck on
    Waiting for invocations
    do you have any idea about this?
    t
    f
    j
    • 4
    • 22
  • m

    Mendel Lerner

    02/11/2022, 4:09 PM
    Hi, I'm importing an external secret into my stack. Is there any way to access a nested value at deploy time without hitting a wall with CF tokens? I know that this can be done for a top-level property:
    Copy code
    secret.secretValueFromJson('password').toString()
    Is there a way to do it for a nested property? (such as
    account.password
    )
    t
    j
    f
    • 4
    • 7
  • d

    David Garcia

    02/11/2022, 4:18 PM
    Hey there, this is less of an sst question and more of a general cdk question. https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.Table.html#methods This is the documentation of an aws-glue table cdk construct. The
    bucket
    property seems to be associated with table output. I can't quite identify how I can configure what S3 bucket the generated glue table is supposed to be looking through when using something like athena to run a query on the bucket.
    f
    • 2
    • 6
  • z

    Zack McKenna

    02/11/2022, 8:07 PM
    Hey all. I’m running into an issue where
    sst start
    or
    sst deploy
    hangs at the
    Deploying Stacks
    stage, it looks like it is caused by the following message from debug logs:
    Copy code
    LoggingEvent {
      startTime: 2022-02-11T20:00:19.337Z,
      categoryName: 'cdk',
      data: [
        '2022-02-11T20:00:19.336Z proxy-agent creating new ProxyAgent instance: undefined\n'
      ],
      level: Level { level: 5000, levelStr: 'TRACE', colour: 'blue' },
      context: {},
      pid: 64731
    }
    And error :
    Copy code
    LoggingEvent {
      startTime: 2022-02-11T20:00:40.219Z,
      categoryName: 'core',
      data: [
        'deploy stack: run cdk deploy: stderr:',
        "2022-02-11T20:00:40.218Z proxy-agent cache hit with key: 'no proxy secure'\n"
      ],
      level: Level { level: 5000, levelStr: 'TRACE', colour: 'blue' },
      context: {},
      pid: 64731
    }
    I’m assuming this is purely related to aws cdk and not sst, but wanted to see if anyone has encountered an issue like this before.
    f
    j
    • 3
    • 5
  • d

    Devin

    02/11/2022, 11:14 PM
    I'm going to remove a stack hosted at my
    <http://domain.com|domain.com>
    on route 53 and move it to... Netlify I guess. I'll keep
    <http://app.domain.com|app.domain.com>
    for the SST application. Effectively splitting the static site and the application. Anyone have any thoughts about things I should watch out for?
    t
    j
    • 3
    • 10
  • a

    ACPixel

    02/12/2022, 4:29 AM
    Hi friends! Having a small issue that I can't seem to figure out. I'm working on a social image generator much like the tutorial has, but my app is using esm bundles to get top level awaits etc. The problem is that
    chrome-aws-lambda
    uses
    __dirname
    in it's code, which doesn't work when in esm. Not sure if there's an easy way around this, or if I should just have the one function not use ESM or something, either way any help would be greatly appreciated! 🙂
    d
    • 2
    • 2
  • p

    Pablo Fernandez

    02/12/2022, 12:27 PM
    How would you implement a function that generates sample data in a development stack for a developer to work with? This is something that should never run in production.
    r
    • 2
    • 2
  • d

    Dan Van Brunt

    02/12/2022, 6:28 PM
    Is anyone familiar with how CDK creates stacks in a construct and what that means in CFN land in term of linkage/maintenance? Specifically interested in how one deletes these resources without the CDK CLI. Do you have to delete just the main stack and something deletes the other for you? Or these are actually completely silo’d stack which require you to delete each one independently?
    j
    f
    • 3
    • 3
  • s

    Shah Hossain

    02/13/2022, 6:38 AM
    Hello everyone, I am new to SST. I had to add a range key to one of the DynamoDB tables in my app. Now, I am getting the following error while deploying:
    Copy code
    Export dev-storage:ExportsOutputFn.... cannot be deleted as it is in use by dev-api
    I tried renaming the table. But, that did not work either. Please suggest.
    a
    r
    +2
    • 5
    • 13
  • j

    Jon Bretman

    02/13/2022, 2:45 PM
    Hello 👋 I'm considering using SST for a new project and one of my requirements will be to provision AWS resources dynamically for customers e.g. each customer would have their own deployed lambdas / dynamoDB tables etc... I'm wondering if there is any prior art in using SST/CDK from inside a lambda?
    o
    t
    c
    • 4
    • 8
  • p

    Pablo Fernandez

    02/13/2022, 2:50 PM
    Has anybody wrote a way for developers to easily create sample data? And easily destroy it and recreate it? How do you do it?
    g
    j
    f
    • 4
    • 28
  • p

    Pablo Fernandez

    02/13/2022, 6:09 PM
    Is it possible to deploy the frontend (react) in dev mode to act as an ephemeral review app to share with someone else to try it out?
    d
    f
    • 3
    • 2
  • k

    Kujtim Hoxha

    02/13/2022, 8:02 PM
    Hi there, is anyone using NestJS https://docs.nestjs.com/ for their backends with SST ? if so how are you making it work together ?
    f
    m
    a
    • 4
    • 24
  • g

    Guy Shechter

    02/14/2022, 7:25 AM
    I’m having an issue where I created an AppSyncApi in one project, and am trying to extend it in another project (ie, add resolvers) by importing the GraphQL like the example:
    Copy code
    import { GraphqlApi } from "@aws-cdk/aws-appsync-alpha";
    
    const api = new AppSyncApi(this, "GraphqlApi", {
      graphqlApi: GraphqlApi.fromGraphqlApiAttributes(this, "IGraphqlApi", {
        graphqlApiId,
      }),
    });
    However, if i then try to add a unit resolver where i reference a datasource I added in the first stack it fails; also, if i try to lookup the datasource by name
    Copy code
    api.getDataSource('mydsName');
    it also returns undefined. Any thoughts?
    t
    d
    f
    • 4
    • 14
  • k

    Kujtim Hoxha

    02/14/2022, 2:34 PM
    Hi everyone, I am trying to wrap my head around the cold start speed and how I could optimize it, my functions are around 1.8mb and I am seeing >1s cold starts I did some tests running a payload of 100 req a second on a function and it I was getting
    Copy code
    99th percentile: 2.042189291s
    P95th percentile: 2.011754874s
    P90th percentile: 1.985379375s
    P50th percentile: 1.683923479s
    Max : 2.042189291s
    Mean : 1.571575707s
    Min : 884.344166ms
    The time with warm lambdas is around 100-300ms. Is 1.8mb too much? The env. is node14 with 1024mb memory and arm64 arch. I am really wondering if this has to do with the size of the function or something else.
    t
    a
    • 3
    • 36
  • a

    Akos

    02/14/2022, 5:10 PM
    Hey! Does anyone have any tips and tricks for finding out the "deploy hot path" for a set of cloudformation stacks to deploy? Or a dependency graph of CFN stacks? We have 18 stacks and counting and deploys are gradually slowing down so would like to debug.
    t
    • 2
    • 8
  • k

    Kristian Lake

    02/14/2022, 6:55 PM
    hey all, typescript question forgive me.. how do you write this into ts?
    t
    • 2
    • 11
  • s

    Slackbot

    02/14/2022, 9:07 PM
    This message was deleted.
    p
    • 2
    • 2
  • p

    Patrick

    02/14/2022, 10:32 PM
    Hey everyone! Is there an easy way to simplify how resources are named when they’re deployed with SST? For example I have a IAM User Group with the generated name:
    dev-appname-MyStack-Admins8B360DEA-U132VR1JXSY0
    . I would love to be able to set the name myself so I could name it something like:
    dev-appname-MyStack-Admins
    t
    d
    • 3
    • 13
  • p

    Pablo Fernandez

    02/15/2022, 2:16 PM
    How do I configure a Cognito User Pool to prevent sign ups? to require users to be created by other users.
    m
    • 2
    • 3
  • a

    Ashishkumar Pandey

    02/15/2022, 5:02 PM
    I’m building a feature which is going to be writing events to SQS from a lambda. The incoming throughput can go very high ~ 2000 req/s and these would be processed in realtime . Should I be using lambda and SQS for this or something else. Anyone processing data at such scale, how are you approaching it, should I be looking into MQTT or Kafka. I’m worried about back-pressure and throttling.
    t
    d
    a
    • 4
    • 55
1...505152...83Latest