https://serverless-stack.com/ logo
Join Slack
Powered by
# help
  • ö

    Ömer Toraman

    10/17/2021, 4:19 PM
    ApiGatewayV1Api
    construct is the REST API, and
    Api
    construct is the HTTP API, am I mistaken?
    m
    • 2
    • 6
  • ö

    Ömer Toraman

    10/17/2021, 4:50 PM
    Is this okay to add
    "*moduleResolution*": "node"
    to
    tsconfig.json
    , if the application is not going to contain any front-end resources?
    t
    • 2
    • 1
  • ö

    Ömer Toraman

    10/17/2021, 5:14 PM
    I can only see
    TZ
    property on the
    process.env
    object. Why is that?
    r
    • 2
    • 8
  • ö

    Ömer Toraman

    10/17/2021, 6:29 PM
    I rearranged the
    tests
    folder a bit, however, I cannot import anything from
    stacks
    folder using the relative path or path alias. I wanted to add path alias, and I did for
    src
    directory, however, it does not work
    stacks
    directory.
    a
    f
    t
    • 4
    • 10
  • s

    Sam Hulick

    10/18/2021, 1:36 AM
    is there some reason
    process.env.IS_LOCAL
    would be
    undefined
    ? 🤔 when running
    yarn start
    t
    • 2
    • 14
  • p

    Patrick Young

    10/18/2021, 2:49 AM
    Updated from 0.46.1 to 0.47.0 (and just now on 0.47.1) and ran into this error:
    Copy code
    2021-10-18T02:43:56.445Z	undefined	INFO	Executing '.build/src/apolloServer/lambda.handler' in function directory '/Users/myusername/dev/chimera/apps/iridium-backend'
    internal/modules/cjs/loader.js:892
      throw err;
      ^
    
    Error: Cannot find module '../../build/Release/runtime-client.node'
    Require stack:
    - /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js
    - /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/index.js
    - /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js
    - /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
        at Function.Module._load (internal/modules/cjs/loader.js:745:27)
        at Module.require (internal/modules/cjs/loader.js:961:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at new RuntimeClient (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js:44:29)
        at Object.run (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js:44:20)
        at Object.<anonymous> (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js:14:8)
        at Module._compile (internal/modules/cjs/loader.js:1072:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
        at Module.load (internal/modules/cjs/loader.js:937:32) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js',
        '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/index.js',
        '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js',
        '/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js'
      ]
    }
    Looked in npx folder and
    Copy code
    '../../build/Release/runtime-client.node'
    is not there... well the whole "build" folder is not there. Searched this slack channel and aws-lambda-ric seems like a pile 🙂. I've tried destroying the stacks and bringing them back up. Clearing caches etc.
    git clean -fxd
    it all! BURN ALL THE CACHING WHAHAHA but still same error 😕. Did I miss something on the upgrade or I'm not 100% sure what to even try or how to debug this...
    t
    • 2
    • 24
  • g

    Gerald

    10/18/2021, 3:53 AM
    Can't find the correct syntax on how to add a domain. in cdk we do userPool.addDomain("UserPoolDomain", {    cognitoDomain: {      domainPrefix: domainName    }, }); how to do this in sst? I already tried cognito: {   userPool: {     addDomain("UserPoolDomain", {        cognitoDomain: {               domainPrefix: domainName            },         }     },
    g
    • 2
    • 4
  • g

    Gerald

    10/18/2021, 5:03 AM
    breakpoint inside cognito triggers not supported yet?
    g
    f
    • 3
    • 3
  • j

    Jarek Pietraszek

    10/18/2021, 7:50 AM
    Hey, I'm a complete newbie and can't progress in the guide any further than implementing the security. My problem is that I'm unable to make a request to post a note as a specific user I've created beforehand.
    r
    m
    c
    • 4
    • 71
  • m

    Mr.9715

    10/18/2021, 8:09 AM
    Is there a way to attach and enable Lambda Insights permissions and layers for all the functions in SST? like setting in
    _app_.setDefaultFunctionProps()
    ?
    f
    • 2
    • 4
  • ö

    Ömer Toraman

    10/18/2021, 10:16 AM
    Is it possible to find the relevant API from the URL on API Gateway console?
    r
    • 2
    • 23
  • m

    manitej

    10/18/2021, 11:49 AM
    when running
    npx sst start
    it's not getting deployed
    Copy code
    WebSocket connection error Error: Unexpected server response: 500
        at ClientRequest.<anonymous> (C:\sst\expo-sst-demo\node_modules\ws\lib\websocket.js:716:7)
        at ClientRequest.emit (events.js:400:28)
        at ClientRequest.emit (domain.js:475:12)
        at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
        at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
        at TLSSocket.socketOnData (_http_client.js:515:22)
        at TLSSocket.emit (events.js:400:28)
        at TLSSocket.emit (domain.js:475:12)
        at addChunk (internal/streams/readable.js:293:12)
        at readableAddChunk (internal/streams/readable.js:267:9)
    t
    f
    • 3
    • 4
  • d

    Devin

    10/18/2021, 4:33 PM
    I’m attempting to deploy a NextJs app with Amplify. I run
    npx sst deploy
    and I get
    Copy code
    Error: Invalid UserPoolId format.
    at new CognitoUserPool
    This app works locally however, I can login, sign up etc… Any ideas where I should be looking to make this work?
    t
    f
    • 3
    • 8
  • ö

    Ömer Toraman

    10/18/2021, 5:53 PM
    Hello people. Why is
    .d.ts
    ignored?
    t
    • 2
    • 9
  • ö

    Ömer Toraman

    10/18/2021, 6:31 PM
    What is the default value
    defaultPayloadFormatVersion
    for
    sst.Api
    , is it
    sst.ApiPayloadFormatVersion.V1
    or
    sst.ApiPayloadFormatVersion.V2
    ?
    t
    b
    a
    • 4
    • 72
  • ö

    Ömer Toraman

    10/18/2021, 6:52 PM
    I want to configure API Gateway logging and metrics. Do I need to configure both
    accessLogs
    and
    httpApi
    properties for
    sst.Api
    ?
    f
    • 2
    • 2
  • t

    Tony J

    10/18/2021, 7:06 PM
    Recently deployed a function to enable provisioned concurrency, followed the docs and put it under currentVersionOptions and provisionedConcurrentExecutions. After deployment I looked at the function in the AWS console do double check it is enabled, and it shows “No configurations” under the “Configuration / Concurrency” tab, is this expected behavior?
    f
    • 2
    • 2
  • w

    William Hatch

    10/18/2021, 7:22 PM
    Hello all, fairly new to sst, and our primary applications are IoT based, so lots of reliance on mqtt. Wondering if anybody is integrating with either MQ, or, the mqtt broker in iotcore, and using sst functions as handlers for their respective events? Seems like there's really solid support for SQS, with multiple constructs such as Queue and Topic, so, just wondering how much of a lift this is going to be for us, were we to also utilize sst for the device to cloud paths. We're having very good experience with API, kinesis, auth, but those are all to support data wrangling and client api's, so now we're considering the deeper layers. Thanks for any insights and pointers.
    t
    f
    • 3
    • 7
  • ö

    Ömer Toraman

    10/18/2021, 8:15 PM
    Do you think that API Gateway stages would be of any use when we have the stage for the whole stack itself?
    t
    f
    • 3
    • 6
  • n

    Noah D

    10/18/2021, 10:01 PM
    Anyone ever had similar issues setting up one of the example repos? From what I can see, the command used for installation on this page should reference
    typescript-monorepo
    not just
    typescript
    but get issues either way atm 🤨
    t
    f
    • 3
    • 13
  • c

    Carter Himmel

    10/18/2021, 10:17 PM
    howdy folks! i'm currently running into an issue with one of our builds failing. it installed our dependencies with yarn@3 correctly then just hangs for ~20 minutes and cancels. i'm looking at our logs and there's nothing here
    • 1
    • 1
  • c

    Carter Himmel

    10/18/2021, 10:21 PM
    it looks like building hangs with yarn 3 -- we just switched over to it
    t
    s
    +2
    • 5
    • 9
  • s

    Sam Hulick

    10/18/2021, 11:39 PM
    just found a major bug in SST. any Lambda func that returns nothing results in an JSON parse error. this might be with
    yarn start
    only, have yet to confirm a deployed stack
    f
    t
    a
    • 4
    • 8
  • s

    Sam Hulick

    10/19/2021, 1:59 AM
    yarn test
    has stopped working for me.. not sure when this bug cropped up. but it’s in the latest version of SST
    Copy code
    Preparing your SST app
    Detected tsconfig.json
    Transpiling source
    Linting source
    Running type checker
    ● Validation Error:
    
      Preset ts-jest not found.
    
      Configuration Documentation:
      <https://jestjs.io/docs/configuration.html>
    a
    t
    • 3
    • 8
  • a

    Aram

    10/19/2021, 11:56 AM
    Hi guys, Is there a way to pass params to the sst start command? I am asking dditional params that will be accessible from inside the stack
    m
    t
    • 3
    • 8
  • l

    Lionel T.

    10/19/2021, 1:24 PM
    hi guys, Is it possible to use SST’s cdk constructs with only the CDK cli?
    t
    f
    • 3
    • 7
  • ö

    Ömer Toraman

    10/19/2021, 4:48 PM
    Hey!, How was the stack being formed? I remember reading it somewhere, but can’t find it.
    sst.json
    Copy code
    {
      "name": "someName",
      "region": "us-east-1",
      "main": "stacks/index.ts"
    }
    stacks/index.ts
    Copy code
    import * as sst from "@serverless-stack/resources";
    import { MainStack } from "./MainStack";
    
    export default function main(app: <http://sst.App|sst.App>): void {
          // Set default runtime for all functions
          app.setDefaultFunctionProps({
                runtime: "nodejs14.x"
          });
    
          new MainStack(app, "someOtherName");
    }
    t
    • 2
    • 6
  • ö

    Ömer Toraman

    10/19/2021, 5:18 PM
    Any idea:
    Copy code
    CDK_NEW_BOOTSTRAP set, using new-style bootstrapping
     :hourglass_flowing_sand:  Bootstrapping environment <aws://209163669254/eu-central-1>...
    Trusted accounts for deployment: (none)
    Trusted accounts for lookup: (none)
    Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
    CDKToolkit: creating CloudFormation changeset...
    8:16:36 PM | CREATE_FAILED        | AWS::S3::Bucket       | StagingBucket
    You have attempted to create more buckets than allowed (Service: Amazon S3; Status Code: 40
    0; Error Code: TooManyBuckets; Request ID: X1M1FNKV93F5KDZ6; S3 Extended Request ID: 7K4alU
    cRflPiDu18Ucj/YDcM1kjiYx5kdhjmdE4s/CTkQXOTNyU2vfzNCsJyDVM0iaB8BNsJh6w=; Proxy: null)
    
    8:16:37 PM | CREATE_FAILED        | AWS::SSM::Parameter   | CdkBootstrapVersion
    User: arn:aws:iam::209163669254:user/omer.t@mindbehind.com is not authorized to perform: ss
    m:PutParameter on resource: arn:aws:ssm:eu-central-1:209163669254:parameter/cdk-bootstrap/h
    nb659fds/version (Service: AmazonSSM; Status Code: 400; Error Code: AccessDeniedException;
    Request ID: 29feddac-a094-4470-bedb-ce7c4cb7fa08; Proxy: null)
    t
    f
    • 3
    • 12
  • d

    Dan Van Brunt

    10/19/2021, 6:25 PM
    Is there a way to setup
    sst.Api
    to use a
    custom authorizer
    but also allow for anonymous access? Our Custom Authorizer passes into the rest calls the user’s ROLE if they have one. otherwise they are considered anonymous.
    t
    • 2
    • 8
  • m

    Matthew Smithburger

    10/20/2021, 2:24 AM
    trying to get my nextjs site built through SST and getting an error. I’m thinking it has to do with Web3 + SSR, but I do not get the error if I run
    yarn build
    in the directory, only when I run sst deploy.
    Copy code
    ModuleNotFoundError: Module not found: Error: Can't resolve 'electron' in '/Users/matt.smithburger/Projects/mintopoly/server/node_modules/swarm-js/node_modules/got'
    
    
    > Build error occurred
    Error: > Build failed because of webpack errors
        at /Users/matt.smithburger/Projects/mintopoly/server/node_modules/next/dist/build/index.js:397:19
        at async Span.traceAsyncFn (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/next/dist/telemetry/trace/trace.js:60:20)
        at async Object.build [as default] (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/next/dist/build/index.js:77:25)
    
    Error: There was a problem building the "Site" NextjsSite.
        at NextjsSite.buildApp (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/@serverless-stack/resources/src/NextjsSite.ts:545:13)
        at new NextjsSite (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/@serverless-stack/resources/src/NextjsSite.ts:103:16)
        at new UIStack (/Users/matt.smithburger/Projects/mintopoly/server/lib/UI.ts:11:18)
        at Object.main (/Users/matt.smithburger/Projects/mintopoly/server/lib/index.ts:30:3)
        at Object.<anonymous> (/Users/matt.smithburger/Projects/mintopoly/server/.build/run.js:93:16)
        at Module._compile (node:internal/modules/cjs/loader:1095:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
        at Module.load (node:internal/modules/cjs/loader:975:32)
        at Function.Module._load (node:internal/modules/cjs/loader:816:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    
    There was an error synthesizing your app.
    f
    • 2
    • 9
1...242526...83Latest