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

    Sam Hulick

    10/26/2021, 9:16 PM
    I ran into this bug that rears its ugly head once in a while, where the
    yarn start
    process just stops listening. it says “Listening for requests…” but when the front end makes requests, I can see that nothing happens, and the front end gets a 500 error. you guys want me to send any logs over?
    ö
    t
    f
    • 4
    • 16
  • t

    thdxr

    10/27/2021, 12:59 PM
    That is strange, I'm not sure where the ws module is coming from I don't think we need that
    d
    • 2
    • 38
  • s

    Seth Geoghegan

    10/27/2021, 1:03 PM
    I'm migrating an API from SLS to SST and have local development working! 🎉 However, I'm having issues when I deploy and I believe it's related to my RDS database being within a VPC.
    t
    r
    • 3
    • 32
  • g

    Garret Harp

    10/27/2021, 1:58 PM
    Has anyone had react site deploys take an extremely long time? Our most recent was stuck on update AWS:CloudFront:Distribution for ~40 minutes
    t
    • 2
    • 5
  • j

    Joe Kendal

    10/27/2021, 2:10 PM
    Has anyone run into an issue using versioned lambda ARNs for AppSync’s Custom Lambda Authorizer
    t
    • 2
    • 7
  • m

    Mike McCall

    10/27/2021, 4:59 PM
    ts question, I have a file
    test/setup.ts
    with a
    beforeAll
    function. When I run
    npx sst build
    i get this error
    Copy code
    ReferenceError: beforeAll is not defined
        at Object.<anonymous> (/Users/mike/source/trevco-commerce/test/setup.ts:21:1)
        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)
        at Function.Module._load (internal/modules/cjs/loader.js:778:12)
        at Module.require (internal/modules/cjs/loader.js:961:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at Object.<anonymous> (/Users/mike/source/trevco-commerce/.build/run.js:86:17)
        at Module._compile (internal/modules/cjs/loader.js:1072:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    t
    • 2
    • 9
  • r

    Ryan Martin

    10/27/2021, 7:13 PM
    I got through the notes app Basics section (super cool btw. love the error handling stuff at the end) and started reading the Best Practices section. I have a question about the Organizing Serverless Projects part. It talks about separating everything and the different ways to do that, but it only talks about the API and AWS stuff. It doesn’t talk about the react app at all. Is there a reason for that or am I missing something? https://serverless-stack.com/chapters/organizing-serverless-projects.html
    t
    a
    • 3
    • 3
  • d

    Dan Van Brunt

    10/27/2021, 7:16 PM
    Anyone ever have similar issues getting routes to work with
    aws-serverless-express
    in
    sst.Api
    ?
    t
    • 2
    • 11
  • g

    Gabriel Araújo

    10/27/2021, 8:47 PM
    Hi! There is any guide on how to implement step functions using sst? Thanks
    a
    t
    f
    • 4
    • 12
  • p

    Patrick Gold

    10/27/2021, 9:26 PM
    Before I dig too much into this, thought I’d post here. I’m getting a syntax error when deployed, but not when debugging. (There are no ‘?’ in my function) so I’m thinking it’s a transpile issue with some package, but not sure. Wondering if anyone has seen this before I go digging:
    Copy code
    "Runtime.UserCodeSyntaxError: SyntaxError: Unexpected token '?'",
            "    at _loadUserApp (/var/runtime/UserFunction.js:98:13)",
            "    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
            "    at Object.<anonymous> (/var/runtime/index.js:43:30)",
            "    at Module._compile (internal/modules/cjs/loader.js:999:30)",
            "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)",
            "    at Module.load (internal/modules/cjs/loader.js:863:32)",
            "    at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
            "    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)",
            "    at internal/main/run_main_module.js:17:4
    t
    f
    • 3
    • 20
  • a

    Adrian Schweizer

    10/27/2021, 10:11 PM
    I have a problem with Api auth. I have two different api stacks, one for authenticated users, and another for signup, which should be available for unauth users as well. The problem is, that I get 403 forbidden, when I try to post something to the unauth api from within react:
    Copy code
    this.api = new sst.Api(this, "SignupApi", {
             defaultAuthorizationType: "AWS_IAM",
             defaultFunctionProps: {
                environment: {
                   TABLE_NAME: table.tableName,
                },
             },
             routes: {
                "POST   /registrations": "src/registration/register.main",
                "POST   /activations": "src/registration/activate.main",
             },
          });
    In AuthStack:
    Copy code
    constructor(scope, id, props) {
          super(scope, id, props);
    
          const { signupApi, api, bucket } = props;
    
          this.auth.attachPermissionsForUnauthUsers([signupApi]);
    s
    • 2
    • 4
  • r

    Ross Coundon

    10/27/2021, 11:05 PM
    I'm running
    sst start
    for a new app and I received the error causing it to abort
    Copy code
    failed: Received response status [FAILED] from custom resource. Message returned: A conflicting operation is currently in progress against this resource. Please try again.
    Looking at the Cloudformation console I can see that it's to do with a logRetention The console shows me these options with heading Stack rollback paused If I re-run
    sst start
    it starts up okay but the log retention isn't applied. Also, the outputs of the stack, like my API URL aren't output and are missing from the Cloudformation console too
    f
    g
    • 3
    • 13
  • m

    Mark Fox

    10/27/2021, 11:13 PM
    I'm fighting with
    StaticSite
    and must be missing something. All I've done is set up the default SST project (
    npx create-serverless-stack@latest blah
    ), created the default Nuxt project in the root of that (
    npx create-nuxt-app frontend
    ), and then modified MyStack.js to tell
    StaticSite
    how to build the Nuxt app and where to find the static files. Easy. An
    npx sst start
    works but deploys an SST place-holder site which recommends doing an
    npx sst deploy
    . So I do that and visit the CloudFront link spat out by the deploy. I get an access denied error expressed as an XML document.
    f
    • 2
    • 19
  • f

    Frank

    10/28/2021, 12:06 AM
    Hey @Boris Tane, can you check the versions of all the sst and cdk dependencies in ur package.json?
    b
    • 2
    • 5
  • d

    Devin

    10/28/2021, 6:32 PM
    Are there any example apps for deployment that cover both DEV and PROD? I can only ever run
    npx sst depoy --stage prod
    once. After than I get barrels of cloud formation errors.
    g
    f
    • 3
    • 33
  • g

    Garret Harp

    10/28/2021, 8:52 PM
    Is it possible to forcibly change the stack name? Whenever using nested stacks it makes the name extremely long because its repeating the previous stack names also. Running into an issue where the stack names are too long.
    f
    m
    • 3
    • 13
  • g

    Garret Harp

    10/28/2021, 10:34 PM
    Ok so I tried to create nested stacks to get around the parameter limit errors on cloudformation and locally everything is fine but if I try and deploy I get errors about parameter count... how would I go about reducing the number of parameters so I can deploy?
    t
    f
    j
    • 4
    • 24
  • d

    Devin

    10/28/2021, 11:40 PM
    I have a domain in route 53. Currently it has a hosted zone for
    <http://mycoolsite.com|mycoolsite.com>
    with a NS record and an SOA record if I view it in the aws console. I would like to set up both
    <http://www.mycoolsite.com|www.mycoolsite.com>
    and
    <http://mycoolsite.com|mycoolsite.com>
    . Is the following okay or should I delete the hosted domain manually in the console.
    Copy code
    // Create a Next.js site
        <http://this.site|this.site> = new sst.NextjsSite(this, "Site", {
          path: "frontend",
          customDomain:
            scope.stage === "prod"
              ? {
                  domainName: "<http://mycoolsite.com|mycoolsite.com>",
                  domainAlias: "<http://wwww.mycoolsite.com|wwww.mycoolsite.com>",
                }
              : undefined,
    t
    • 2
    • 12
  • n

    Noah D

    10/29/2021, 12:39 AM
    Anyone ever seen the error message
    stack-xyz failed: Replacement type updates not supported on stack with disable-rollback.
    ? Seems to only be the case on my debug stack, i.e. if i push it to seed the deploy to dev works fine. Getting it when I do something small like change the name of a lambda function. Can delete and remake the stack but seems like shouldn't be happening
    f
    j
    • 3
    • 11
  • ö

    Ömer Toraman

    10/29/2021, 1:55 AM
    Hello people. I’m a total newbie in testing (writing unit tests). Is there an example detailed repo that you might recommend to see how the tests are written? (For sst especially, but can be in Node generally as well)
    j
    s
    • 3
    • 4
  • j

    Jake Harris

    10/29/2021, 3:16 AM
    Is there a config to disable .env file functionality I am missing?
    t
    j
    • 3
    • 3
  • s

    Sahan Amadoruge

    10/29/2021, 3:27 AM
    Hey, Can anyone explain what happens when we use this code block
    _new_ Bucket(_this_, "Bucket", {
    s3Bucket: {
    bucketName: "my-bucket",
    },
    });
    t
    r
    • 3
    • 6
  • j

    Jake Harris

    10/29/2021, 4:48 AM
    Another (hopeful) quickie: I'm trying to add a
    modules.d.ts
    to a barebones typescript template from
    create-serverless-stack --language typescript
    and it's not getting picked up, even when I specify in tsconfig's
    files[]
    t
    • 2
    • 3
  • e

    Emil Styrke

    10/29/2021, 11:43 AM
    Hi all! Trying to write a unit test for my lambda code, but I need a DynamoDB table to run the lambda against (pulled from process.env.TABLE_NAME). Is there a best practice for how to do this?
    new MyStack(app, "test-stack")
    and then pull the table name out of the stack somehow? Run dynamodb-local? It seems I'm missing something obvious here...
    r
    j
    • 3
    • 9
  • s

    Sahan Amadoruge

    10/29/2021, 11:52 AM
    when i try to create a Bucket. I'm getting "bucket is already exists error". Is there any way to create a bucket if not exists?
    r
    l
    • 3
    • 4
  • d

    Dan Van Brunt

    10/29/2021, 12:48 PM
    Is there a reason
    commandHooks
    doesn’t seem to console the cli output of commands ? I can get a command
    echo Hello
    to out…. but
    yarn build
    is silent?
    t
    • 2
    • 8
  • a

    Adrian Schweizer

    10/29/2021, 12:51 PM
    Does anyone know how to allow an api stack to access cognito identity pool created in an auth stack? I tried like this, but I get error messages I don't understand:
    Copy code
    this.api.attachPermissions([table, identityPool]); // identityPool is authStack.auth.identityPoolId, which console.logs to "${Token[TOKEN.390]}"
    Errors I get:
    Copy code
    Checking deploy status...
    dev-convento-signupApi | UPDATE_IN_PROGRESS | AWS::IAM::Policy | SignupApiLambdaPOSTactivationsServiceRoleDefaultPolicyDE00BD65 
    dev-convento-signupApi | UPDATE_IN_PROGRESS | AWS::IAM::Policy | SignupApiLambdaPOSTregistrationsServiceRoleDefaultPolicy9B80B04C 
    dev-convento-signupApi | UPDATE_FAILED | AWS::IAM::Policy | SignupApiLambdaPOSTregistrationsServiceRoleDefaultPolicy9B80B04C Actions/Condition can contain only one colon. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: 64ca5b25-90b4-4fc7-b981-cb619b3bbcd9; Proxy: null)
    dev-convento-signupApi | UPDATE_FAILED | AWS::IAM::Policy | SignupApiLambdaPOSTactivationsServiceRoleDefaultPolicyDE00BD65 
    dev-convento-signupApi | UPDATE_ROLLBACK_COMPLETE | AWS::IAM::Policy | SignupApiLambdaPOSTactivationsServiceRoleDefaultPolicyDE00BD65 
    dev-convento-signupApi | UPDATE_ROLLBACK_COMPLETE | AWS::IAM::Policy | SignupApiLambdaPOSTregistrationsServiceRoleDefaultPolicy9B80B04C 
    dev-convento-signupApi | UPDATE_FAILED | AWS::CloudFormation::Stack | dev-convento-signupApi 
    
     ❌  dev-convento-signupApi failed: Actions/Condition can contain only one colon. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: 64ca5b25-90b4-4fc7-b981-cb619b3bbcd9; Proxy: null)
    
    Stack dev-convento-signupApi
      Status: failed
      Error: Actions/Condition can contain only one colon. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: 64ca5b25-90b4-4fc7-b981-cb619b3bbcd9; Proxy: null)
    t
    • 2
    • 61
  • g

    Garret Harp

    10/29/2021, 4:26 PM
    Anyone know how to make eventbridge retry lambda targets? Currently it only runs twice when it errors and it seems thats because its running lambda asynchronously which means according to eventbridge the lambda succeeded even though it didnt.
    j
    t
    • 3
    • 33
  • l

    Lukasz K

    10/29/2021, 6:36 PM
    I'm trying to tackle an issue with my cors config for apigw2 for the better part of the day and seeing no progress.. Whenever I call a single endpoint with different query params preflight kicks in like it's a new route. Anyone seen similar results?
    a
    • 2
    • 3
  • g

    Garret Harp

    10/29/2021, 10:13 PM
    Anyone happen to know of anyway to sync ssm parameters from a root aws account to every account in the org?
    s
    f
    • 3
    • 7
1...272829...83Latest