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

    Blake E

    01/10/2022, 9:17 PM
    Hey! So running into a new error - I’ve setup a Cloudwatch Rules with a Lambda Target: •
    @aws-cdk/aws-events.Rule
    for rule •
    @serverless-stack/resources.Function
    for function •
    @aws-cdk/aws-events-targets.LambdaFunction
    + the
    rule.addTarget
    for targeting the lambda to rule Everything deploys fine, and have an
    sst start
    running, but my lambda function is throwing error:
    Copy code
    > node_modules/@serverless-stack/resources/dist/App.js:212:57: warning: "@aws-cdk/aws-s3" should be marked as external for use with "require.resolve"
        212 │                 codeDirectory: path.join(require.resolve("@aws-cdk/aws-s3"), "../auto-delete-objects-handler"),
            ╵                                                          ~~~~~~~~~~~~~~~~~
    
     > node_modules/fsevents/fsevents.js:13:23: error: No loader is configured for ".node" files: node_modules/fsevents/fsevents.node
        13 │ const Native = require("./fsevents.node");
           ╵                        ~~~~~~~~~~~~~~~~~
    
    8f2f6eb8-04d0-404d-84b6-743959b1267e ERROR build_failure: The function src/cw-ingestor.debugHandler failed to build
    Seems like the
    sst.Function
    build sugars aren’t getting wired up properly when using the
    aws-event-targets
    package?
    t
    • 2
    • 14
  • r

    Ross Coundon

    01/11/2022, 9:23 PM
    In VSCode, after running
    sst start
    for a few minutes and a few rebuilds from code changes on a TypeScript project, the debugger stops hitting breakpoints. Looking at dev tools in VSCode I see the error
    Copy code
    Error: Error processing setBreakpoints: RangeError: Start offset -2140284536 is outside the bounds of the buffer
    Looking at the Github issues for VSCode I came across this which suggests it's to do with invalid sourcemaps. Could something to do with the sourcemaps be getting corrupted following a rebuild of the code?
    f
    t
    • 3
    • 6
  • m

    Mark Fox

    01/11/2022, 9:53 PM
    We were really liking SST's live Lambda development but lost it once our application got an RDS database. I've taken a couple of stabs at using AWS Client VPN Endpoint to connect to the VPC in which our RDS database lives, but it has punched me in the face each time. I'm close and not giving up, but I'm really hoping that someone has written up their experience setting up something similar.
    s
    t
    j
    • 4
    • 11
  • c

    colin

    01/11/2022, 10:39 PM
    Hey guys, updated to version
    0.57.2
    today and it doesn’t seem like
    sst start
    is running the type checking or linting anymore. Didn’t see any changes in the release log. My
    "lint"
    and
    "typeCheck"
    values are still set to
    true
    in
    sst.json
    and
    .eslintrc
    is below. Any ideas?
    Copy code
    {
      "env": {
        "es2021": true
      },
      "extends": [
        "eslint:recommended",
        "plugin:@typescript-eslint/recommended",
        "serverless-stack"
      ],
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "ecmaVersion": 12,
        "sourceType": "module"
      },
      "plugins": [
        "@typescript-eslint"
      ],
      "rules": {
        "@typescript-eslint/no-empty-interface": "OFF"
      }
    }
    t
    f
    • 3
    • 33
  • m

    Michael Robellard

    01/12/2022, 9:36 PM
    Hello Everyone, Simple questions, trying out SST and I don't see any option to choose which AWS profile I want to run against. Does SST only run against the default profile? I have another AWS account on that profile at the moment.
    s
    • 2
    • 3
  • l

    Lukasz K

    01/13/2022, 8:18 AM
    Hey All! Did any of you stumble upon an issue with broken/changed export refs after updating past v0.57.0 (includes the CDK update that made changes to API authorizers) I can't deploy my project now due to conflicting references for sub-stacks (old exportRef trying to get deleted while it's still referenced by the online version of stack causes migraine to Cloudformation...) with below error:
    Export lktest-altera-stack-Altera:ExportsOutputRefGlobalApiUserPoolAuthorizer0FC6637617CEFDF2 cannot be deleted as it is in use by lktest-altera-stack-Avatars, lktest-altera-stack-Company and lktest-altera-stack-Cost (and 4 more)
    f
    • 2
    • 5
  • c

    Carter Himmel

    01/13/2022, 11:13 PM
    @Frank would you be opposed if i wrote some sort of pr to deploy packages on every commit to something like
    @serverless-stack/resources@0.59.0-next.{commit_hash}
    f
    j
    t
    • 4
    • 6
  • c

    Carter Himmel

    01/13/2022, 11:29 PM
    in other news: im running into a problem with hot-reloading in a monorepo context. this is what our project looks like:
    Copy code
    lib # stack defs
    packages
      hasuraActions
      ...other things
    this is what our function defs look like:

    http://tugboat.dev/uxbm0y.png▾

    im running sst start from the root, so
    app.appPath
    is
    /home/fyko/code/pushas/com.pushas.app/lib
    it has no problem re-compiling changes to stack defs but it cannot do anything in packages/
    t
    f
    • 3
    • 14
  • m

    Michael Robellard

    01/14/2022, 12:37 AM
    I am trying to get My lambda running that connects Dynamodb to Opensearch in the SST Local Environment. However when I try to PUT to the Opensearch endpoint I get: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. In SST I have set up permissions with:
    Copy code
    consumers: {
        dynamodbstream: {
            srcPath: "services/dynamodbstream/",
            handler: "stream.handler",
            environment: {
                SEARCH_ENDPOINT: opensearch_domain.domainEndpoint,
            },
            permissions: [new iam.PolicyStatement({
                actions: ["es:*"],
                resources: [opensearch_domain.domainArn],
            })]
        }
    }
    And I can confirm in the AWS Console that the Permissions are set for the Lambda Role Is there something else that needs permission because of the Local Environment? After some further attempts, I have discovered that if I change the METHOD from post to put I get a different error message. I am not sure why post is causing the error message in question, but now I am getting: User: arnawssts:309833148800assumed-role/mike-local-chartflow-dyna-ChartflowDatadynamodbstr-P6L43N5FZMK/mike-local-chartflow-dyna-ChartflowDatadynamodbstr-dpL0R4lmGyGK is not authorized to perform: es:ESHttpPut Getting closer, but any help would be appreciated. Changing the resources to : ["*"], allowed it to work, but clearly not a best practice. Any ideas would be appreciated.
    d
    f
    u
    • 4
    • 7
  • d

    Derek Kershner

    01/14/2022, 5:15 PM
    @thdxr :
    Right now sst.json needs to be at the root of your repo
    We have some tricky situations to deal with to support it being a subpackage
    I appear to have this working (
    sst.json
    in subpackage), and am planning on adding a second SST app to this monorepo...can you help me determine why this won't work, or if I have found a path? Is it specifically related to
    start
    ? or would it also affect
    build
    and
    deploy
    ?
    a
    t
    s
    • 4
    • 29
  • j

    Jon Holman

    01/17/2022, 6:59 PM
    Does SST support AwsIntegration on API Gateway v1? If so, what is it called? Like this https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.AwsIntegration.html
    r
    t
    • 3
    • 7
  • r

    Ross Coundon

    01/17/2022, 8:28 PM
    For clarity it should read:
    1. If you have one or more 
    @aws-cdk/aws-XXXX
     dependencies, and if they are on the experimental package list below, rename them to 
    @aws-cdk/aws-XXXX-alpha
    . For example, rename 
    @aws-cdk/api-gatewayv2
     to 
    @aws-cdk/*aws-apigatewayv2*-alpha
    .
    f
    • 2
    • 1
  • h

    Hamed Mamdoohi

    01/17/2022, 11:44 PM
    are there plans for SST to support node 16 any time soon ?
    t
    a
    • 3
    • 4
  • r

    Ross Coundon

    01/18/2022, 10:49 AM
    In terms of the experimental packages for CDK v2. Should they remain on 2.7.0-alpha.x to match aws-cdk-lib (rather than updating to current 2.8.0-alpha.x) ?
    a
    f
    • 3
    • 12
  • a

    Adam Fanello

    01/18/2022, 6:43 PM
    Can we get sourcemaps in output for Typescript exceptions while building stacks? I've been doing a lot of piecemeal commenting out and in code to find the source of my failures.
    t
    m
    • 3
    • 12
  • m

    Marcin M

    01/19/2022, 3:22 PM
    Did anyone try to combine NestJS and SST? What I mean, is calling NestJs within the lambda? Is it possible to combine building / boundling the NestJs with SST workflow? Is it possible to use debugging?
    j
    • 2
    • 1
  • d

    Derek Kershner

    01/19/2022, 5:38 PM
    https://github.com/serverless-stack/serverless-stack/pull/1276 @thdxr and @Frank, we had some conversation regarding dev/peer dependencies, I did my best to change only the ones that give me the most trouble, but am open to your thoughts and can change directions. As i update 40+ apps to CDK v2, this is...on my mind. 🙂
    t
    • 2
    • 12
  • d

    Dan Van Brunt

    01/20/2022, 5:21 PM
    First, thank you SO much for the the new SST Console. It’s so helpful and inadvertently an amazing showpiece when showing other devs why SST is amazing. [Feature Requests]: • UI that is portrait-friendly. Currently, when viewed on a verical monitor or even just trying to two-up windows… its very squished. • CollapseAll or ClearEvents in Local tab. LOVE the ablity to “Replay” events… but I’d also like to find a way to de-emphasize previous events so its easier to know which are older events vs ones that just fired.
    t
    f
    • 3
    • 7
  • m

    Mischa Spiegelmock

    01/20/2022, 6:22 PM
    I discovered this esbuild option today - https://esbuild.github.io/api/#main-fields lets you tell esbuild to actually import the ESM version of dependencies because it doesn’t do that even if you do format=esm, it will select the CJS version
    t
    r
    • 3
    • 28
  • m

    Mischa Spiegelmock

    01/21/2022, 8:05 AM
    How do I test a locally-modified version of aws-cdk-lib with SST? I tried
    npm link
    but get
    invalid ConstructNode type
    https://serverless-stack.slack.com/archives/C01HQQVC8TH/p1642709706056000?thread_ts=1642702962.053600&cid=C01HQQVC8TH
    s
    f
    • 3
    • 2
  • d

    Derek Kershner

    01/22/2022, 6:18 PM
    Proposal for Dependencies @thdxr (cc: @Frank, @Adam Fanello) Problem: SST dictates the use of certain versions of commonly used packages (apollo, next, eslint, jest, ts-jest, etc.) This causes use cases with other versions or clashing packages to experience difficulty in troubleshooting with little recourse. Constraint: SST must have a simple getting started, which requires a batteries-included install. Proposed Solution: 1.
    core
    and
    nextjs-lambda
    become packages with no dependencies. There is no downside to this as only
    SST
    packages consume them. 2.
    cli
    and
    resources
    have
    lite
    packages created alongside their current packages. These packages would be the exact same code as the current packages, but with no dependencies. 3. NON-lite
    cli
    and
    resources
    would install
    cli-lite
    and
    resources-lite
    , and also install all of the current dependencies. These packages would become an index file with
    export * from lite
    . Benefits: 1. Allows a path for users to have completely custom and advanced apps with no restrictions. 2. Non-breaking change. 3. During the yearly major-version update (for Jest, ESLint, Apollo, etc), the
    lite
    packages would give
    SST
    a way to support users who do not want to upgrade their support packages (which would be legacy at that point), but still want to have the newest features. Major version updates in those packages are frequently met with challenges, and large apps are likely to appreciate this in a major way. Cons: 1. A small amount of work up front. I would volunteer for this, as I have already spent more time troubleshooting dependencies than would be required to implement. 2. The contributing experience for Open Source Devs of SST would have one layer of abstraction to uncover (they would have to realize the lite packages contain the business logic). 3. It's possible, but unlikely, there might be cryptic errors for
    lite
    users, if things like ESLint are missing, but linting is enabled. Alternatives: 1. Fork. This is essentially the reverse of above, but achieves the same goal. It is more work, and benefit 3 goes away (since it wouldn't be internal SST anymore).
    t
    a
    r
    • 4
    • 9
  • d

    Devin

    01/23/2022, 10:43 PM
    I’ve encountered a bug in the console. When on the Buckets Tab, I can’t delete objects in the bucket anymore. The network tab is all 200's. How can I turn this experience into a useful bug report.
    f
    • 2
    • 8
  • r

    Ross Coundon

    01/24/2022, 9:39 AM
    After updating to use CDK v2 I see this message for each file upload in the build process
    Copy code
    "cdk bootstrap" to version 9 if your organization's policies prevent a successful upload or to get rid of this message)
    Is there a recommended way of bootstrapping since this was done originally by the SST framework?
    l
    f
    • 3
    • 2
  • i

    Ivan Roskoshnyi

    01/24/2022, 3:49 PM
    Hey everyone. Two simple questions: 1. How to modify webpack configuration in SST? We could do this in serverless via
    serverless.yml
    but I found no info how to do it in SST. 2. In SST I use
    serverless-mysql
    what I used in
    serverless
    . Is it ok for SST? I faced an issue when I tried to deploy code to prod:
    Error: Received packets in the wrong sequence
    I found that we need to disable webpack minimization of modules but I have no idea how to do it in SST Hope someone faced these issues. They are looking common but as this framework is new....There are no info in google.
    t
    f
    g
    • 4
    • 24
  • j

    Joe Kendal

    01/24/2022, 6:03 PM
    Does anyone else find themselves repeating this same pattern over and over again? 1. Create a microservice with its own table as a single source of truth 2. If a change happens in the dynamodb table, fire a lambda to send an update event with eventbridge 3. For each microservice that needs a copy, have an event rule that simply puts the latest object in an identical table This seems like a very repetitive / non-scalable process just to keep a bunch of tables in sync so that everything is supposedly decoupled.
    • 1
    • 1
  • i

    Ivan Roskoshnyi

    01/25/2022, 4:33 AM
    Hello everyone! I am trying to use custom domain name for my API. Could someone tell me how to add certificate properly and where do I need to import it from? I want to specify
    alternate domain name
    (programatically) so my url will be human-readable instead of an URL with ID provided by AWS The guide covers only customDomain and route53 creation but it doesn't cover full configuration of it using SST. Glad to any suggestions!
    f
    • 2
    • 2
  • g

    Gregory Houtteman

    01/25/2022, 12:08 PM
    Good Morning all! SST rocks. With that being said I'm having a slight problem, I was slow to upgrade to SST and CDK v2 apparently. I in doing my upgrade I ran into a problem - i am using the aws-cdk-lib/aws-apigatewayv2 so I need to use the @aws-cdk/aws-apigatewayv2-alpha constructs. Only problem apparently the @aws-cdk/aws-apigatewayv2-alpha@2.7.0-alpha.0 has already been removed from npm
    Copy code
    npm ERR! 404  '@aws-cdk/api-gatewayv2-alpha@2.7.0-alpha.0' is not in this registry.
    which means I need to be running CDK v2.8.0 to use @aws-cdk/api-gatewayv2-alpha@2.8.0-alpha.0 I assume I messed up a step somewhere in the upgrade instructions ... it might be because I update to 0.60.4 first then Seed indicated I needed to to do the upgraded steps from the
    Copy code
    <https://github.com/serverless-stack/serverless-stack/releases/tag/v0.59.0>
    which I did but I never actually ran the npx sst update 0.59.0 I reran the 0.60.4
    m
    r
    f
    • 4
    • 10
  • s

    Seth Geoghegan

    01/25/2022, 4:02 PM
    I'm converting a legacy Serverless Framework app written in Python to SST. Things are going fairly smoothly, but my deployed lambdas are large (30+MB) due to bundled dependencies. I've successfully created lambda layers for some of the larger dependencies (psycopg2), but don't understand how to prevent them from being bundled with the deployed lambda. Any tips for how this can be achieved?
    f
    • 2
    • 9
  • d

    Dan Van Brunt

    01/25/2022, 7:25 PM
    [Lambda@Edge Deletes Fixed?]: @Frank @thdxr @Camilo Bravo @Derek Kershner I think I have a working/tested solution/construct for ensuring that stacks with edge functions in them, can get deleted successfully, while ensuring the edge function also get deleted after the 2hr replication delay. • We talk about it here • Here is the branch with a working construct (
    sst.EdgeFunction
    ) So far, the test is only with deleting the original function (no Distro or replicas) and with a 1min delay… but it does prove the case that this is possible and would very likely work with EdgeFunctions as well, since they just need to wait the extra 2hrs. Next steps: • polish cleanup lambda to catch can’t delete lambda error and complete gracefully • consider putting a boolean
    isEdgeFunction
    or similar on
    sst.Function
    or doing this as its current
    sst.EdgeFunction
    which simply extends
    sst.Function
    • celebrate? 🎉
    d
    t
    f
    • 4
    • 15
  • m

    Martin Wawrusch

    01/25/2022, 10:45 PM
    Hi guys, just wanted to let you know how happy we are with what you did with sst. We can't wait to get rid of all the serverless component code.
    a
    d
    f
    • 4
    • 7
1...242526...33Latest