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

    Maged Mortaga

    06/11/2022, 8:10 PM
    Lately I have gotten the error message
    Throttling: Rate exceeded
    very often when I start my application via
    sst start
    . Is it possible to find out what causes the Throttling? From the stack trace I am only able to see that is was thrown by the AWS SDK. It always occurs after the console prints the
    SST Console: <https://console.serverless-stack.com>
    line. If the error is not thrown, which happens after I wait between 10 - 30 minutes, it will print
    Debug session started. Listening for requests...
    and work again
    a
    f
    t
    • 4
    • 10
  • i

    Ian

    06/11/2022, 8:59 PM
    Hello! I'm working inside a docker container and when I tried sst start, it's not picking up the file changes. Help is very much appreciated. Thanks!
    a
    • 2
    • 5
  • j

    Jon Holman

    06/12/2022, 3:11 AM
    I've been playing around with creating a new webapp that you can only login (at least to start) with Google accounts. I read both of these articles: https://serverless-stack.com/examples/how-to-add-google-authentication-to-a-serverless-api.html https://serverless-stack.com/examples/how-to-add-google-login-to-your-cognito-user-pool.html Now I'm trying to make sure I am getting this correctly. I'm getting a little confused down the cognito user pool vs cognito identity pool rabbit hole, but I'm also getting confused with SST's Auth constructor and how the second article added support for Google accounts after the Auth constructor by adding
    const provider = new cognito.UserPoolIdentityProviderGoogle(stack, "Google", {
    Is there a way I can provide my Google clientId and clientSecret directly to the Auth constructor? Do I need an identity pool if I'm not providing access to AWS services (if not, how do I do that via the SST's Auth constructor)? Thanks for your help.
    a
    f
    • 3
    • 10
  • w

    Wyatt Goettsch

    06/13/2022, 5:31 AM
    I'm getting a "duplicate graphql modules" error trying to run locally. I read that I should try to disable bundling? Edit: disabling bundle minification fixed it.
    f
    • 2
    • 1
  • f

    Francis Menguito

    06/13/2022, 7:07 AM
    What’s the
    Function
    construct for?
    r
    • 2
    • 5
  • i

    Ian

    06/13/2022, 8:14 AM
    Hello! I'm having problems using the layers with ESM lambda and I have confirmed that this is an ongoing issue through this twitter post: https://twitter.com/coderbyheart/status/1486470882008645634?s=20&amp;t=Vtq1BPfn1wfM2hc0mpKnDw Now they have a workaround(https://github.com/vibe/aws-esm-modules-layer-support) for this issue and I'm trying to follow the workaround. I was able to create a symlink using the commandHooks. However, I don't know how to add the symlink option during the creation of the zip files.
    f
    j
    • 3
    • 6
  • s

    Swapnil Bandiwadekar

    06/13/2022, 8:38 AM
    Hello. I am trying to implement Queue in my project, I want configure max retries for the Queue in case of failure. I referred the docs but I can't see any option which allow us to do that. Please help. Cc. @Harish Venkatesan
    l
    f
    • 3
    • 8
  • m

    Magnus Nordin

    06/13/2022, 12:15 PM
    Hello. I have a setup with AppSync and GraphQL. It is deployed to one region but I want to have the same setup in some other region in AWS. When I run the same deploy with towards a new region I get errors about roles that already exists. Any suggestions or guide that could give me some pointers?
    f
    • 2
    • 3
  • k

    Karolis Stulgys

    06/13/2022, 2:37 PM
    👋 can I have my api
    customDomain
    something like api-hello.great.world.com ? let's say I own world.com domain from aws. I try something similar but when it's deployed the customDomain is still not what I named it
    a
    f
    • 3
    • 21
  • i

    Ivo Evans-Storrie

    06/13/2022, 3:26 PM
    Hi. I'm trying to use the
    Script
    construct to upload some assets to a bucket. It's working, but the rollback feature isn't working as expected - when the function fails, it retries once and then nothing happens. The stack never finishes deploying, or becomes marked as a failed deploy (it's been about 50 minutes at time of writing). I can see my function code is working as expected - in the code snippet below, "2" is logged. Does anyone have any idea what else could be wrong?
    Copy code
    import * as debug from "../debug";
    import { Handler } from "aws-lambda";
    
    type Script<TParams = Record<string, never>, TResult = unknown> = Handler<{ params: TParams }, TResult>;
    
    const aspect = <TParams>(lambda: Script<TParams>): typeof lambda => {
      return async (event, context, callback) => {
        debug.init(event);
        try {
          const res = await lambda(event, context, callback);
          return res;
        } catch (error) {
          console.log("1");
          debug.flush(error);
          console.log("2");
          throw error;
        }
      };
    };
    
    export default aspect;
    f
    • 2
    • 4
  • m

    mickey phoenix

    06/13/2022, 4:36 PM
    I’m having trouble setting up an HttpLambdaAuthorizer. Symptom: everything else in my stacks is being created successfully, including the authorization lambda itself, but the actual Authorizer that connects the API Gateway to the authorization lambda is not being created. If I manually create it in the AWS UI, everything works great, so I’m pretty sure it’s not some problem with the rest of the stacks. Any ideas what I might be doing wrong in my creation of the HttpLambdaAuthorizer?
    r
    f
    • 3
    • 32
  • k

    Karolis Stulgys

    06/13/2022, 7:20 PM
    👋 I can just use
    NextjsSite
    construct to deploy my site and use nextjs
    /api
    route for lambda endpoints right? What's the pros/coins instead of using sst
    Api
    construct?
    f
    d
    • 3
    • 6
  • v

    Vegard Bjørsvik

    06/13/2022, 8:43 PM
    When adding sst to an existing git project what is the best approach? Make a new directory with
    npm init sst
    or can I just update an existing project with the config files and
    package.json
    ?
    f
    • 2
    • 1
  • e

    Eric

    06/14/2022, 12:47 AM
    has anyone used AWS Step Functions with serverless stack?
    t
    • 2
    • 1
  • r

    Rohith Gilla

    06/14/2022, 5:21 AM
    Hello!! This is not specific to SST but would be so happy if such thing already exists in SST. Consider this scenario I want to run a lambda function but at a certain time when an even comes. For example, say I want to build a tweet scheduler So I give content, time to tweet, so for example today at 2:40 pm I give my application to tweet at tomorrow 10:00 am with the content. How do we handle such cases? How do we schedule to run lambda function tomorrow at 10 am
    j
    s
    • 3
    • 10
  • m

    Mirza

    06/14/2022, 12:32 PM
    @Frank @Jay any suggestions for doing new iam.*PolicyStatement*({ in typescript? When I follow the guide and try the following:
    Copy code
    auth.attachPermissionsForAuthUsers([
        // Allow access to the API
        api,
        // Policy granting access to a specific folder in the bucket
        new iam.PolicyStatement({
          actions: ['s3:*'],
          effect: iam.Effect.ALLOW,
          resources: [
            bucket.bucketArn + '/private/${<http://cognito-identity.amazonaws.com:sub|cognito-identity.amazonaws.com:sub>}/*',
          ],
        }),
      ]);
    I get the following error:
    Copy code
    Type 'PolicyStatement' is not assignable to type 'string | Omit<string, SupportedPermissions> | IConstruct | [IConstruct, string] | PolicyStatement'.
      Type 'PolicyStatement' is missing the following properties from type 'PolicyStatement': action, notAction, principal, notPrincipal, and 3 more.ts(2322)
    d
    • 2
    • 6
  • m

    Mirza

    06/14/2022, 12:53 PM
    @Frank @Jay any idea why I get the following typescript error for
    Copy code
    IdentityPoolId: auth.cognitoIdentityPoolId,
    error:
    Copy code
    property) IdentityPoolId: string | undefined
    Type 'string | undefined' is not assignable to type 'string | CfnOutputProps'.
      Type 'undefined' is not assignable to type 'string | CfnOutputProps'.ts(2322)
    d
    t
    • 3
    • 10
  • s

    Slackbot

    06/14/2022, 1:30 PM
    This message was deleted.
    d
    m
    • 3
    • 2
  • v

    Viswa

    06/14/2022, 2:22 PM
    I am trying to upgrade to sst 1.2.18 and wanted to confirm if it requires any specific CDK version? yarn sst update bumps up the cdk version as well to cdk 2.24.0. Can i stay on CDK 2.7 and still upgrade to sst v1.2.18? @Frank @Jay
    t
    • 2
    • 2
  • s

    Sakar

    06/14/2022, 4:27 PM
    Copy code
    Hi, In old version we set the permission like this api.ALLattachPermissions(sst.PermissionType.ALL); how to do it in new version.
    f
    • 2
    • 3
  • t

    Tobias T

    06/14/2022, 5:27 PM
    Does anyone know of any good solution for exporting / importing a dynamodb table to another dynamodb table?
    t
    r
    +2
    • 5
    • 14
  • d

    David Garcia

    06/14/2022, 5:54 PM
    Hey, I'm trying to figure out what the default value for
    defaultAuthorizer
    is for an sst.API if you don't pass one in. Does anyone know? I'm trying to have a ternary based on environment, if my environment is nonprod, would setting the
    defaultAuthorizer
    to undefined break the deploy process?
    f
    • 2
    • 1
  • j

    Joshua Borton

    06/14/2022, 6:20 PM
    Hey all! My current setup without SST has access to
    httpMethod
    on the event but while using SST, this is always
    undefined
    . What is the correct way to access the http method here?
    t
    • 2
    • 3
  • a

    Adrián Mouly

    06/14/2022, 9:01 PM
    Hello guys! Are you guys following any convention for resources name, logical ID, path ID, etc? I’ve found that recently I broke a bucket because I’ve changed the ID of it, then the logical-id also changed. Now I noticed all my logical-id are shitty, I want to know which is the convention that I should use, and also if the logica-id should contain the stack name, and if it should be camelCase, etc…
    f
    • 2
    • 7
  • m

    Matt k

    06/14/2022, 9:06 PM
    Is there a way to utilize lambda function URLs with sst? I've got an entire apigateway in my stack just for a single webhook, it'd be nice to rip it out and just use this.
    f
    • 2
    • 8
  • f

    Francis Menguito

    06/15/2022, 7:23 AM
    Just wondering, for DynamoDB, single table architecture, what do you usually use as a Sort Key?
    r
    b
    f
    • 4
    • 14
  • k

    Karolis Stulgys

    06/15/2022, 7:59 AM
    👋 Is there a "roadmap" when
    RemixjsSite
    will be added as a construct?
    f
    • 2
    • 3
  • j

    Justin Robinson

    06/15/2022, 1:02 PM
    Hi all, quick question. Is it possible to have 2 stacks in a project that you can deploy to different regions or would you need 2 projects ?
    j
    f
    • 3
    • 3
  • d

    Daniel Ashcraft

    06/15/2022, 3:33 PM
    Has anyone seen this error before?
    Copy code
    ✘ [ERROR] Top-level await is not available in the configured target environment ("node14")
    
        node_modules/@serverless-stack/resources/dist/AppSyncApi.js:4:26:
          4 │ const { mergeTypeDefs } = await Util.weakImport("@graphql-tools/merge");
    t
    • 2
    • 5
  • j

    justindra

    06/15/2022, 5:05 PM
    Just looking to slowly migrate our API endpoints from Serverless Framework to SST. And just reading through this guide: https://docs.serverless-stack.com/migrating/serverless-framework#proxying Just wanted to confirm that this is what it means by the catch-all route? 1. Rename/move api.example.com (Serverless Framework) to old-api.example.com 2. Setup api.example.com in SST 3. Set default route in api.example.com (SST) to old-api.example.com (Serverless Framework) Is my understanding on that correct?
    f
    • 2
    • 4
1...7980818283Latest