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

    Sean Matheson

    06/06/2022, 9:31 AM
    Argh, the sync limitation in CDK is killer. Working with ESM, can't reach for
    require
    to dynamically import, and
    import(depPath)
    is async. Anyone know of a way around this limitation?
    t
    • 2
    • 6
  • n

    Nathan

    06/06/2022, 10:57 AM
    https://docs.serverless-stack.com/constructs/EventBus#cdktarget-1
    f
    • 2
    • 13
  • k

    Karolis Stulgys

    06/06/2022, 1:27 PM
    šŸ‘‹ I can not get to pass the stripe
    webhook
    endpoint validation. I have secret and I receive the stripe-signature, still getting 400. This might has todo with the
    event.body
    ?
    Copy code
    try {
        if (!sig || !endpointSecret) return { statusCode: 400 };
        e = stripe.webhooks.constructEvent(
          event.body as string,
          sig as string,
          endpointSecret
        );
      } catch (err) {
        return { statusCode: 400 };
      }
    f
    • 2
    • 2
  • m

    Max Liu

    06/06/2022, 2:08 PM
    May I please get some help for this question? https://serverless-stack.slack.com/archives/C01UJ8MDHEH/p1654518525775199
    k
    f
    • 3
    • 5
  • s

    Seth Geoghegan

    06/06/2022, 5:39 PM
    I am using AWS Event Bridge in a shared development environment across a growing team of developers. What are some strategies to use a shared event bridge bus across multiple unique developer environments? I want to prevent developer1's environment from processing an event meant for developer2's environment
    a
    t
    d
    • 4
    • 25
  • j

    Jordan Bryan

    06/06/2022, 7:05 PM
    Hi all, are there any docs for setting up sst on an existing serverless project? When I try downloading sst via
    npm install @serverless-stack/cli --save-exact
    , I’m seeing
    Copy code
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/jordanbryan/.npm/_logs/2022-06-06T18_33_06_226Z-debug-0.log
    Did I miss a step?
    f
    • 2
    • 3
  • r

    Ross Coundon

    06/06/2022, 8:00 PM
    With Kysely, does anyone know if it’s possible to build a MySQL query that includes reference to a FULLTEXT index using
    MATCH() AGAINST() ?
    t
    • 2
    • 2
  • s

    Santiago Castro

    06/06/2022, 9:28 PM
    Hello, what are the benefits of using typescript instead of javascript for SST projects?
    f
    a
    • 3
    • 7
  • s

    Sam Hulick

    06/06/2022, 10:33 PM
    I’ve made a change to a Lambda function:
    Copy code
    ephemeralStorageSize: Size.gibibytes(4),
    and SST says it doesn’t detect any infrastructure changes. šŸ¤” EDIT: oh.. shoot. the setting is completely ignored. I tried creating a new Lambda func with 1024MB of ephemeral storage and I see in AWS it’s 512MB. I am on SST 1.1.2 though, and 1.2.16 is out, so I’ll try upgrading later when I get home
    f
    • 2
    • 4
  • m

    Max Liu

    06/07/2022, 1:48 AM
    Hi, Iā€m having some trouble with the
    build
    command of this example: https://github.com/serverless-stack/serverless-stack/tree/master/examples/nextjs-app I just simply pull the folder and did
    npm install
    , then
    npm buld
    . It gives me this error:
    Copy code
    > nextjs-app@0.0.0 build
    > sst build
    
    Using stage: service-deployer
    Preparing your SST app
    Synthesizing CDK
    Building Next.js site frontend
    
    Error: Command failed with ENOENT: ./node_modules/.bin/next build
    spawn ./node_modules/.bin/next ENOENT
        at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
        at onErrorNT (node:internal/child_process:478:16)
        at processTicksAndRejections (node:internal/process/task_queues:83:21) {
      errno: -2,
      code: 'ENOENT',
      syscall: 'spawn ./node_modules/.bin/next',
      path: './node_modules/.bin/next',
      spawnargs: [ 'build' ],
      originalMessage: 'spawn ./node_modules/.bin/next ENOENT',
      shortMessage: 'Command failed with ENOENT: ./node_modules/.bin/next build\n' +
        'spawn ./node_modules/.bin/next ENOENT',
      command: './node_modules/.bin/next build',
      escapedCommand: '"./node_modules/.bin/next" build',
      exitCode: undefined,
      signal: undefined,
      signalDescription: undefined,
      stdout: '',
      stderr: '',
      failed: true,
      timedOut: false,
      isCanceled: false,
      killed: false
    }
    
    There was a problem building the "Site" NextjsSite.
    
    There was an error synthesizing your app.
    I’m using node@v16.15.1
    f
    s
    • 3
    • 13
  • j

    Jason S

    06/07/2022, 5:21 AM
    I'm on version
    0.69.7
    f
    • 2
    • 2
  • k

    Kenny

    06/07/2022, 10:31 AM
    In my AuthApiStack I want to get the
    site.url
    that's in the FrontendStack.
    Copy code
    export function AuthApiStack({ stack, app }) {
      const { bucket } = use(StorageStack);
      const { table } = use(StorageStack); //This new ApiStack references the table resource from the StorageStack that we created previously.
    
      const auth = new Auth(stack, "Auth", {
        login: ["email"],
        cdk: {
          userPoolClient: {
            supportedIdentityProviders: [
              cognito.UserPoolClientIdentityProvider.GOOGLE,
              cognito.UserPoolClientIdentityProvider.COGNITO,
            ],
            oAuth: {
              callbackUrls: [
                app.stage === "prod"
                  ? "<https://dfwwlqfwiq3c2.cloudfront.net/>"
                  : "<http://localhost:3000>",
              ],
              logoutUrls: [
                app.stage === "prod"
                  ? "<https://dfwwlqfwiq3c2.cloudfront.net/>"
                  : "<http://localhost:3000>",
              ],
            },
          },
        },
      }); ...
    I want to replace the cloudfront urls with site.url but this stack is in use buy the FrontendStack
    Copy code
    export function FrontendStack({ stack, app }) {
      const { auth, api, domain } = use(AuthApiStack);
      const { bucket } = use(StorageStack);
    
      const site = new ReactStaticSite(stack, "ReactSite", {
        path: "frontend",
        environment: {
          REACT_APP_API_URL: api.customDomainUrl || api.url,
          REACT_APP_REGION: app.region,
          REACT_APP_BUCKET: bucket.bucketName,
          REACT_APP_USER_POOL_ID: auth.userPoolId,
          REACT_APP_IDENTITY_POOL_ID: auth.cognitoIdentityPoolId,
          REACT_APP_USER_POOL_CLIENT_ID: auth.userPoolClientId,
          REACT_APP_API_STAGE: app.stage,
          REACT_APP_COGNITO_DOMAIN: domain.domainName,
        },
      });
    
      stack.addOutputs({
        SiteUrl: site.url,
      });
    }
    My frontend React also needs SiteUrl but I cans easily pass it through the environment variables.
    f
    • 2
    • 12
  • a

    Andrew Brown

    06/07/2022, 11:13 AM
    I am creating my SST application with Gitpod (Cloud Developer Enviroment) and I am working to access the 'https://console.serverless-stack.com/'
    f
    k
    t
    • 4
    • 26
  • s

    Santiago Castro

    06/07/2022, 2:40 PM
    I am looking for a microservices monorepo example, does anyone know of any?
    t
    • 2
    • 13
  • d

    Daniel Ashcraft

    06/07/2022, 2:57 PM
    Copy code
    SyntaxError: The requested module '@serverless-stack/resources' does not provide an export named 'TableFieldType'
    
    lib/index.js:632
    import { Table as Table2, TableFieldType } from "@serverless-stack/resources";
    Anyone have experience with this? Seems to be a module resolution issue but it's inside of the lib
    t
    • 2
    • 10
  • a

    Alex Price

    06/07/2022, 4:41 PM
    Hello! I've got a deployment which is getting stuck on whatever comes after
    AWS::Route53::RecordSet
    . It just times out šŸ˜• Can anyone let me know what comes after that so I can debug? šŸ™
    k
    • 2
    • 2
  • s

    Shubham Sinha

    06/07/2022, 4:56 PM
    I'm facing issue in accessing private route. Non authenticated routes are working perfectly. I am trying to use token obtained from signin api. Repo for reference: https://github.com/xinhash/sst-go-lang-starter
    Copy code
    {
      "status": 403,
      "headers": {
        "content-length": "23",
        "content-type": "application/json"
      },
      "body": "{\"message\":\"Forbidden\"}"
    }
    I'm following this guide: https://serverless-stack.com/chapters/adding-auth-to-our-serverless-app.html#create-a-stack but can't find signInAliases as well
    f
    • 2
    • 6
  • f

    FJ

    06/07/2022, 5:09 PM
    Hello, is there a way to attach inline policy to roles created to lambda functions on deployment?
    f
    k
    • 3
    • 7
  • l

    Lambert Chu

    06/07/2022, 5:51 PM
    Hey all, our team is having issues with loading environment variables in our app. We’ve been setting variables through console.seed.run, which has been working well. Recently, new variables we’ve been adding haven’t been picked up in the app, even after re-deploying stages. We use
    process.env
    to load variables:
    Copy code
    const twitterClientId = process.env.TWITTER_CLIENT_ID;
    And now get errors like this:
    Copy code
    {
        "errorType": "Error",
        "errorMessage": "Missing TWITTER_CLIENT_ID environment variable",
        "stack": [
            "Error: Missing TWITTER_CLIENT_ID environment variable",
            ...
    }
    t
    • 2
    • 4
  • n

    Noah D

    06/08/2022, 12:05 AM
    Wondering if anyone had any insights or example code of how they perform integration tests atm using jest and SST? I would ideally be keen to test at a high level my api and validate adding/getting objects works as expected, without really caring about implementation detail. Though am a bit unsure how I would authenticate my requests in a test suite, i am currently using aws cognito and iam (similar to what is seen in the guide) as my auth for my api. Any help would be greatly appreciated šŸ™
    t
    g
    • 3
    • 4
  • t

    Tim

    06/08/2022, 12:30 AM
    is there a way to force esbuild to include files that are only imported dynamically in the bundle? or if not is there any way to make SST use tsc instead of esbuild?
    t
    • 2
    • 10
  • s

    Santiago Pergamo

    06/08/2022, 11:17 AM
    Hi there, congratulations on your work done on SST! It seems very nice, so I'm giving it a try, so far I've been using Serverless Framework (SF) with plugin
    serverless-webpack
    to get small-sized lambdas and when I migrated a simple project over SST, I found that with SST I get bigger sized lambdas.
    a
    r
    t
    • 4
    • 11
  • f

    Francis Menguito

    06/08/2022, 11:49 AM
    How do you access the
    stage
    inside a lambda function handler?
    a
    • 2
    • 2
  • s

    sforman

    06/08/2022, 1:58 PM
    any way of putting constructs, entire app or stacks within a vpc?
    t
    • 2
    • 5
  • f

    Francis Menguito

    06/08/2022, 3:38 PM
    Anybody understand this error?
    Copy code
    You can mark the path "md5" as external to exclude it from the bundle, which will remove this error.
    I tried to use it on one of my function handlers
    t
    • 2
    • 8
  • l

    Lambert Chu

    06/08/2022, 4:54 PM
    Is the
    NODE_ENV
    environment variable set by default? The value is always undefined for us, even when including it in the stack environments
    t
    • 2
    • 11
  • s

    Sam Frampton

    06/08/2022, 6:23 PM
    Can someone link the TS-Monorepo Example? Every link I click I get 404 from Github
    t
    • 2
    • 4
  • g

    Graham Tremper

    06/08/2022, 6:47 PM
    Hello. Our JSON endpoint in our Api construct doesn't seem to have gzip compression enabled for our responses. Is there a way to turn that on? Thanks!
    f
    • 2
    • 3
  • m

    Michael Holroyd

    06/08/2022, 6:51 PM
    Heya, I'm trying live lambda debugging, but all my invocations are stuck "pending" -- I see they are invoked in the logs, but my function is not run. Glancing around AWS console everything seems ok (and this was working earlier today). How would I go about debugging what is up?
    a
    f
    • 3
    • 6
  • a

    Adrian Schweizer

    06/08/2022, 10:54 PM
    StaticSite with plain html files has no local dev built in, correct?
    f
    • 2
    • 3
1...787980...83Latest