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

    Adam Fanello

    02/08/2022, 6:38 PM
    npm install
    has become quite noisy with warnings in the last couple of releases. šŸ˜•
    g
    j
    • 3
    • 11
  • t

    Tim Birkett

    02/09/2022, 12:21 PM
    Hi šŸ‘‹ - We have a need to use a custom CDK bootstrap template? Has anyone managed to do this with SST? Can I CDK bootstrap an account manually outside of SST?
    t
    f
    • 3
    • 5
  • r

    Ryan Weaver

    02/09/2022, 9:26 PM
    I currently have an EventBus deployed in the stack via the cdk. I use Lambdas and the SDK to spinup new events and rules for that bus dynamically. I would like to use an onDelete script that runs, when I sst remove, before the EventBus gets deleted, but positioned in the code in a way that it can receive the eventbus cdk object (along with other objects for other dynamic resources). Is this possible?
    f
    • 2
    • 4
  • j

    Jason

    02/10/2022, 8:57 PM
    I have a lambda running at an api endpoint serving images. How can I put a cloudfront cdn in front of this with sst? As far as I can tell there's no cloudfront construct
    f
    d
    • 3
    • 9
  • j

    jamlen

    02/11/2022, 9:30 AM
    In my stacks, I need to define a dynamo table and pass it into an Api. The issue I have is what I want is to create the table if it doesn't exist but if it does to get a reference to the existing table and then pass that into the Api. I know I can set the
    app.defaultRemovalPolicy
    so I can remove the tables on ephemeral environments, but if it is in prod how does it pass a reference to the existing table?
    f
    t
    +2
    • 5
    • 9
  • r

    Roger Rajaratnam

    02/11/2022, 12:38 PM
    Hello, is anyone using sst with nx.dev?
    t
    j
    +2
    • 5
    • 9
  • d

    David Martin

    02/11/2022, 7:48 PM
    Hi all, I have a question about
    nextjssite
    in a monorepo. My goal is to decrease the amount of time it takes to start local SST debugging. Right now, it takes between 5-10 minutes to start a debug session. The nextjs part of my monorepo project is why it takes so long to start. Does anyone know of a way I can start debugging without deploying the nextjs site? Or, perhaps, what if the nextjs construct had an option to skip invalidation, or perhaps it used regular lambda’s instead of edge lambdas to speed up the deployment? that kind of tradeoff would be fine in dev mode.
    f
    • 2
    • 11
  • d

    Drew

    02/11/2022, 9:59 PM
    Speedscale.com built a network capture system for mocking third party network traffic. They’re building a demo using CDK+SST. It’s pretty sweet, so I thought I’d give them a shoutout here. We can test our Stripe integration without calling stripe.com. I was about to share their demo video, but I remembered I haven’t asked permission to share it yet.
    f
    d
    j
    • 4
    • 8
  • b

    Benjamin Mitchell

    02/14/2022, 10:02 AM
    I’m trying the ā€˜create a nextjs app’ example. I’m on Mac, using AWS SSO with no default profile. I can successfully run:
    AWS_PROFILE=uat npx sst start
    I then go into the
    frontend
    directory to try and run the nextjs front end using
    npm run dev
    (which is mapped as follows in package.json
    "dev": "sst-env -- next dev"
    ) Which works fine, but when I load the page in a browser and click on the button wired up to an nextjs api function that calls DynamoDB via the AWS SDK I get this error after ~20 seconds:
    ā€œCredentialsErrorā€,ā€œmessageā€:ā€œMissing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1ā€
    Any ideas on what I can try? I’m not clear how the AWS SDK in the API function gets it’s AWS credentials information.
    m
    t
    • 3
    • 12
  • j

    jamlen

    02/14/2022, 11:25 AM
    Does anyone have any examples of a sensible way to set up an sst Function to consume an Azure service bus queue? I have these docs and example but wondering the best way to have a long running process that is consuming a queue https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-nodejs-how-to-use-queues#receive-messages-from-a-queue
    t
    • 2
    • 7
  • f

    Fredrik Kjellberg

    02/14/2022, 5:20 PM
    Hi! I'm trying to use SST in an existing monorepo where nested projects are not allowed. They have to be siblings. This is causing the
    sst-env
    script to fail when trying to find the SST project. There is a PR that fixes this issue from @Ivo Evans-Storrie waiting for review. It would be great if this PR (or some other way of solving the issue) could be included in an upcoming release. https://github.com/serverless-stack/serverless-stack/pull/1224
    j
    f
    t
    • 4
    • 19
  • j

    Jean-Philippe Lemelin

    02/15/2022, 2:44 AM
    Hi! I try the exemple
    rest-api-ts
    changeset
    e931cfac63969aeba3deb3d4f0842fe544bcd2f1
    https://github.com/serverless-stack/serverless-stack/tree/master/examples/rest-api-ts With node node v12.20.1
    Copy code
    SST: 0.60.8
    CDK: 2.7.0
    When I start the debug with vscode after an invoke I got this error from the
    aws-lambda-rci
    lib
    Copy code
    .../node_modules/@serverless-stack/aws-lambda-ric/lib/index.js:34
    const error = new Errors.UnhandledPromiseRejection(reason?.toString(), promise);
    
    SyntaxError: Unexpected token '.'
        at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
    My VS Code launch.json:
    Copy code
    {
            "name": "Debug SST Start",
            "type": "node",
            "request": "launch",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/sst",
            "runtimeArgs": ["start", "--increase-timeout", "--region", "ca-central-1"],
            "env": {
                "AWS_SDK_LOAD_CONFIG": "1",
                "AWS_PROFILE": "my-aws-profile",
            },
            "console": "integratedTerminal",
            "skipFiles": ["<node_internals>/**"]
          },
    🟢 Note: with node v14.17.3, it’s working !!
    t
    • 2
    • 1
  • s

    Sam N

    02/15/2022, 6:34 PM
    Does the team run something like
    yarn audit
    as part of the build process? Are there any plans to fix the vm2 vulnerabilities: https://github.com/advisories/GHSA-6pw2-5hjv-9pf7?
    f
    • 2
    • 5
  • d

    David Martin

    02/15/2022, 9:43 PM
    I’m getting frequent 504 errors when locally debugging. These errors are occurring in my mobile app after requests to my local debug session fail. In fact, when I get these errors, my local debug stack never even receives the request. Have I misconfigured something (again)?
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<http://www.w3.org/TR/html4/loose.dtd>">
    <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <TITLE>ERROR: The request could not be satisfied</TITLE>
    </HEAD><BODY>
    <H1>504 ERROR</H1>
    <H2>The request could not be satisfied.</H2>
    <HR noshade size="1px">
    CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection.
    We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
    <BR clear="all">
    If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
    <BR clear="all">
    <HR noshade size="1px">
    <PRE>
    Generated by cloudfront (CloudFront)
    Request ID: ZsfXobFJPMJp_60zGS55R6cbfKCgGXEzGjauVaIWFFVxC_ZZHZiB0g==
    </PRE>
    <ADDRESS>
    </ADDRESS>
    </BODY></HTML>
    t
    f
    j
    • 4
    • 32
  • j

    Jason

    02/16/2022, 2:13 PM
    I'm trying to use @ffmpeg-wasm and it needs webassembly threads support but it seems it's not enabled by default. I tried to enable it by setting
    Copy code
    environment: {NODE_OPTIONS: '--experimental-wasm-threads'}
    but after adding it the function is just never invoked. it's an api and I am invoking it manually via the sst console. Where am I going wrong? Is this the correct way to enable it? Edit: ah it is trying to invoke, I now see an error
    /var/lang/bin/node: --experimental-wasm-threads is not allowed in NODE_OPTIONS
    . Is there any way to allow this?
    t
    f
    • 3
    • 21
  • e

    Erik Robertson

    02/17/2022, 12:15 PM
    Hello @thdxr and @Frank, I've seen you guys are currently looking into options for adding testing capabilities into SST. I'm at a stage where I want to add unit tests (individual API calls) and integration tests (sequences of calls) to my lambda based REST API. What would be your recommendation as the testing library to use that will have the best chance to be compatible with what you are working on? Is Jest still your reco?
    j
    • 2
    • 1
  • b

    Brett Fieber

    02/17/2022, 8:07 PM
    Hi there! In my
    StorageStack
    I'm creating an sst.Table construct that references an existing table, like so:
    Copy code
    this.myDataTable = new sst.Table(this, 'MyData', {
          dynamodbTable: dynamodb.Table.fromTableArn(this, 'MyDataTable', `arn:aws:dynamodb:${scope.region}:${scope.account}:table/${scope.stage}-my-data`)
        })
    Then in my
    ApiStack
    I'm granting the Api permissions, like so:
    Copy code
    this.api.attachPermissions([myDataTable])
    All is well.. Hurray. But... If I want to query from a global secondary index, such as
    GSI0
    , I get permission denied. Do I need to create an additional sst.Table construct pointing to that index? such as:
    Copy code
    this.myDataGSITable = new sst.Table(this, 'MyDataGSI', {
          dynamodbTable: dynamodb.Table.fromTableArn(this, 'MyDataTableGSI', `arn:aws:dynamodb:${scope.region}:${scope.account}:table/${scope.stage}-my-data/index/GSI0`)
        })
    Or is there a more appropriate method to grant access to the API?
    a
    d
    • 3
    • 17
  • j

    jamlen

    02/18/2022, 12:35 PM
    When setting up rules for the
    EventBus
    how do I point to the Default event bus? I've been trying to set up a subscriber to all dynamoDB events but it never gets hit and I'm assuming that's because the events are being fired onto the default bus.
    f
    a
    • 3
    • 9
  • d

    Daniel Gato

    02/19/2022, 5:10 PM
    There is a bug in the SST web console. The value 0 shows as <null>. Not sure where to report it
    t
    f
    m
    • 4
    • 3
  • s

    Sean Matheson

    02/24/2022, 12:33 PM
    Ah dang, VPCs completely pwn the console. Understandable, but still disappointing. šŸ˜ž
    f
    • 2
    • 1
  • d

    Daniel Gato

    02/24/2022, 3:34 PM
    One thing that would be super useful is the possibility to clear the console for the page ā€œLocal Invocationā€
    t
    f
    • 3
    • 2
  • j

    Jason

    02/24/2022, 7:47 PM
    There's some lambda layers released that allow you to have a runtime greater than 14 https://github.com/fusebit/everynode I'm trying to use it in sst but it requires I use
    runtime: lambda.Runtime.PROVIDED
    but
    sst.Function
    doesn't allow it. Is there some workaround I can do apart from just using the cdk constructs directly? I really need to use node v16... I'm guessing provided runtimes aren't allowed because of the local dev stuff but if it's node I think it shouldn't make a difference?
    f
    • 2
    • 6
  • k

    Karo

    02/25/2022, 5:34 PM
    šŸ‘‹ hi there, just checking if what i'm seeing is a bug. I'm using the console for testing an API endpoint, but the lambda was getting empty events. After hitting the API endpoint directly through the browser, then i started getting the proper events when testing in the console. Currently using sst version 0.65.6.
    t
    • 2
    • 9
  • d

    Drew

    02/26/2022, 10:03 PM
    How do you folks test your SST/CDK changes? • I have a bad habit of deploying any new changes to our QA environment, and pissing off everyone using that environment. •
    jest test
    work for you?
    f
    b
    s
    • 4
    • 4
  • r

    Ross Coundon

    02/28/2022, 12:57 PM
    NPM is flagging there’s a critical vulnerability in the aws-cdk package from vm2 - issue here I’m not actually directly referencing specifically aws-cdk, and I have to be honest, it’s not clear to me how AWS is now doing its dependencies in regard to @aws-cdk, aws-cdk-lib etc. I’m wondering if an update to a later version of the aws-cdk (and therefore @aws-cdk/aws-apigatewayv2-authorizers-alpha etc) would resolve this? More generally, what’s the release strategy for new versions of aws-cdk-lib?
    f
    c
    t
    • 4
    • 6
  • r

    Ross Coundon

    02/28/2022, 7:39 PM
    Does the memory allocation for a lambda have any effect when running locally?
    d
    f
    j
    • 4
    • 8
  • c

    Carter Himmel

    03/01/2022, 6:15 AM
    is there an advised way to store multiple services in a single monoreo with sst, similar to the image from seed docs? our one service is getting a bit large and we wanna start splitting stuff up
    f
    • 2
    • 5
  • a

    Ashishkumar Pandey

    03/01/2022, 3:56 PM
    if we figure out how to achieve blue / green or canary deployments, we’ll break the serverless and cloud native world. šŸ˜…
    f
    • 2
    • 3
  • r

    Ross Coundon

    03/01/2022, 5:06 PM
    Have you guys considered providing the ability to run a subset of functions locally? For example, maybe I’ve got some heavy lifting cron based functions that chug away and move data around from APIs into databases. I’m happy with those and I’m happy for them to carry on running in AWS. However, I’m developing a lambda attached to an API route that uses that data which I want to debug locally? I guess it could also be useful in a situation where there is a last resort emergency production issue that could be quickly identified by updating the stack to run that single function locally but have all the others carry on as they were.
    f
    s
    a
    • 4
    • 12
  • d

    Dan Van Brunt

    03/02/2022, 3:34 PM
    [StaticSite - Potential Bug]: Ever since the removal of the atomic deploys… it no longer seems to handle orphan files (deleting/removing old files from s3) Below is a screenshot of our production bucket with a file last uploaded on Feb23 which we’ve since removed from the frontend code (thus should not be in the bucket) and redeployed. What is ā€œsupposedā€ to happen with orphan files? We are on
    SST v0.60.2
    d
    f
    t
    • 4
    • 102
1...262728...33Latest