https://serverless-stack.com/ logo
Join SlackCommunities
Powered by
# help
  • c

    Cass Winfrey

    12/10/2021, 2:20 PM
    Got an odd one here with Nextjs API lambda - endpoint keeps 503'ing with this error from CloudWatch (pic 1), if I look into the transpiled code I find this (pic 2) on the line it’s referencing which relates to the method in 3rd pic - is this some kind of bundling error? I’ve narrowed down the offending package to the import in my 4th pic. Have verified all env vars are included Initially I thought this was an issue with
    fetch
    needing to be polyfilled - but commenting out any fetch calls the issue remains, I have found https://answers.netlify.com/t/builds-started-to-fail-all-of-a-sudden/44183/16 which displays the same symptoms around serverless, auth0 and the
    webpack_require
    message… Really not sure where to go from here so help would be great, thanks
    f
    • 2
    • 3
  • d

    Danny Rivadeneira

    12/10/2021, 2:51 PM
    I need help I can't find any information in the sst documentation. I want to run the sst application but I have no buckets available, when I use serverless framework I can specify in which bucket to deploy my application I want to know how to do that from my sst application, I want all my stack to be deployed in a specific bucket.
    f
    • 2
    • 10
  • s

    Sam Hulick

    12/10/2021, 7:19 PM
    just a heads-up about a bug I’ve run into twice: I made a change to some IAM permissions, and it said “Press ENTER to redeploy infrastructure”. I do that, and it just runs through the stacks saying no changes. 🤔 so I ^C the sst start proc, run it again, and then it errors out & quits:
    Copy code
    Cannot delete ChangeSet in status CREATE_IN_PROGRESS
    
     ❌  dev-microservices-api-users failed: The dev-microservices-api-users stack failed to deploy.
    seems like it’s doing a change in the background and the sst start proc is not aware of it. NOTE: I’m on 0.53.3, so it’s possible this was fixed in 0.53.4
    h
    a
    • 3
    • 17
  • t

    Tim V

    12/10/2021, 7:52 PM
    When creating Auth objects, should the cognito.triggers for createAuthChallenge, defineAuthChallenge, and verifyAuthChallengeResponse work with Live Lambda Debugging? I'm not seeing any console output... but I do for preAuthentication, postAuthentication and preTokenGeneration.
    f
    m
    • 3
    • 17
  • p

    Pavan Kumar

    12/11/2021, 4:32 AM
    This is one of the weirdest bug I have seen. So I have created
    new Api
    with bunch or routes. It worked fine. I have been adding new routes to it, it was fine till yesterday! Yesterday, I added new route and that one route is throwing the error. I don't know why!!!? So here is the example of routes which are working.
    Copy code
    'GET    /users': `${SERVICE_PATH}/users/listUsers/listUsers.handler`,
            'GET    /users/{userid}': `${SERVICE_PATH}/users/getUser/getUser.handler`,
            'DELETE /users/{userid}': `${SERVICE_PATH}/users/removeUser/removeUser.handler`,
            'PUT    /users/{userid}': `${SERVICE_PATH}/users/updateUser/updateUser.handler`,
            'POST   /users': `${SERVICE_PATH}/users/createUser/createUser.handler`,
    Now I add one more route to it. (Just to confirm i don't have bug in my handler in have used same handler as in
    GET /users
    )
    Copy code
    'GET    /subscriptions': `${SERVICE_PATH}/users/listUsers/listUsers.handler`,
    Now when I access the route
    GET /subscriptions
    I get following error.
    Copy code
    7a0a127b-a947-47d0-ae12-6a14d47ccb6c REQUEST pavan-someProject--AuthorizerBD825682-clNfJSVK9mGZ [packages/apps/someProject/services/gateway/auth.authorize] invoked by API GET /subscriptions
    7a0a127b-a947-47d0-ae12-6a14d47ccb6c ERROR Error [TypeError]: Cannot read property 'list' of undefined
        at deserializeError (/Users/pavan/MyProgs/someProject/monorepo/node_modules/@serverless-stack/cli/lib/serializeError.js:71:22)
        at printLambdaResponse (/Users/pavan/MyProgs/someProject/monorepo/node_modules/@serverless-stack/cli/scripts/start.js:1457:24)
        at /Users/pavan/MyProgs/someProject/monorepo/node_modules/@serverless-stack/cli/scripts/start.js:1363:7
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
    f
    • 2
    • 6
  • j

    John

    12/11/2021, 2:53 PM
    Hey everyone, I’m a frontend dev building my first sst app, so my knowledge of this stuff is extremely limited. I received a concerning email from AWS this morning stating that I’ve exceeded 85% of the free tier usage limit for the
    AWSQueueService
    service (857,066 requests), and I have no idea where this is coming from. It looks like it’s coming from
    SQS NumberOfEmtpyReceives
    . Can anyone shed some light onto what’s causing this and how I can stop all these requests? This is without my app running. Apologies for the ignorance.
    g
    m
    +3
    • 6
    • 33
  • d

    Devin

    12/12/2021, 5:09 PM
    I’m looking at sending marketing SMS from my app. It looks like the pricing on Twilio is very competitive compared with the pricing for SNS. Anyone have any reasons for thinking on versus the other?
    t
    • 2
    • 5
  • d

    Davide Ungari

    12/12/2021, 9:24 PM
    I created a stack without functions and I get this error when running
    npx sst start
    :
    ENOENT: no such file or directory, open 'project/.sst/functions.jsonl'
    t
    j
    • 3
    • 12
  • g

    Garret Harp

    12/12/2021, 9:30 PM
    Has anyone used ECS + Fargate? I am trying to figure out how to get my fargate tasks to prefer launching on spot but failover to normal if needed and not sure how to do that with the CDK.
    r
    f
    • 3
    • 4
  • l

    Louis Barclay

    12/12/2021, 11:56 PM
    I've always found my prod and dev
    sst
    APIs to work exactly the same way, except with an issue I just found. I can't figure out what's going on. One of my API paths checks CNAMEs for some domains. Code is in screenshot. It uses a resolver from the DNS tools shipped in Node.js by default (imported like this:
    const { Resolver } = require("dns").promises; const resolver = new Resolver();
    ) The inconsistency is that everything works in the dev API (after running npx sst start), whereas in the prod API the first CNAME is successfully found (lines 59-69), but the second CNAME is not (lines 73-82). The error message that comes up in the prod API is as follows:
    Copy code
    2021-12-12T23:39:44.230Z 7826077a-0951-477b-84e6-c4b9358ce4df INFO No certificate_cname Error: queryCname EBADRESP <http://_17f3ff9be4f5c70a4e0.SOME-DOMAIN.com|_17f3ff9be4f5c70a4e0.SOME-DOMAIN.com> at QueryReqWrap.onresolve [as oncomplete] (internal/dns/promises.js:167:17) { errno: 'EBADRESP', code: 'EBADRESP', syscall: 'queryCname', hostname: '<http://_17f3ff9be4f5c70a4e0.SOME-DOMAIN.com|_17f3ff9be4f5c70a4e0.SOME-DOMAIN.com>' }
    Any tips on how to fix this would be appreciated! AFAIK I have not done any particular config to make my prod and dev APIs work differently.
    d
    • 2
    • 5
  • d

    Dave Harig

    12/13/2021, 12:48 PM
    I am looking for a AWS/SST consultant. I’m pretty new to programming and javascript in general, so my learning curve is double-steep with SST. But the benefits are clear. I am hoping to use SST to deploy an AppSync-based AWS backend. Between SST, VTL, App Sync Resolvers, App Sync Functions, Resolver Pipelines, Lambda Functions and Cognito Auth, there is a considerable hill to be climbed. I would love to be able to work with someone a few hours a week to help shorten my learning curve. Please DM me with interest, rate and availability. Thank you!
    f
    • 2
    • 1
  • d

    Dan Van Brunt

    12/13/2021, 1:49 PM
    Can anyone point me in the right direction on when its good/bad to use 
    stack.resolve()
     ? It seems like more of an escape hatch that makes things less extensible as a construct author. No?
    f
    • 2
    • 4
  • p

    Pavan Kumar

    12/13/2021, 3:21 PM
    We are deploying our serverless app using seed.run. After deployment is successful, I want to run e2e integration test on the deployed instance (only dev and staging but not production). How can I achieve that. Using
    after_deployment
    hooks doesn't seems to be ideal as it runs
    n times
    for
    n number of services
    deployed.
    o
    f
    • 3
    • 2
  • e

    Edward Asquith

    12/13/2021, 3:23 PM
    Hi, I’m running through The Guide (https://serverless-stack.com/#guide) and while I can debug into Lambdas (which is very neat, BTW), I’m struggling to get the VSCode debugger to work for the frontend React app. Anyone got any tips on setting up launch.json correctly?
    sst-env
    launcher process may be a factor? I am working in Typescript. I have tried launching using
    npm start
    and attaching to a process, but then the debugger isn’t hitting breakpoints. Experienced backend dev but complete newbie to React, Typescript, SST and VSCode… so apologies in advance if i’m missing something well known.
    t
    • 2
    • 5
  • s

    Sam Hulick

    12/13/2021, 3:55 PM
    anyone know if it’s safe to clean up the
    cdk-hnb659fds-assets-*
    bucket? I just realized there’s thousands of objects in there. too bad CDK doesn’t clean those up for you.. I guess I’ll slap a lifecycle rule on it to clean up
    f
    • 2
    • 2
  • s

    Simone Gaiarin

    12/13/2021, 5:48 PM
    Hi, I have setup a project with sst and language python. Running
    npx sst start
    I get the following error:
    Copy code
    Traceback (most recent call last):
      File "/media/dataHD/development/startup/my-app/my-app/node_modules/@serverless-stack/core/src/runtime/shells/bootstrap.py", line 75, in <module>
        module = import_module(args.handler_module)
      File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'src.c520f1aa'
    a4bf9a48-382c-4a7f-97f6-85c830a2a7a6 ERROR ModuleNotFoundError: No module named 'src.c520f1aa' 
     undefined
    t
    • 2
    • 15
  • s

    Simone Gaiarin

    12/13/2021, 6:18 PM
    is there any guide I can follow on how to connect to a postgres db on an external server (not on aurora)?
    t
    • 2
    • 3
  • s

    Simone Gaiarin

    12/13/2021, 6:45 PM
    is it possible to add breakpoints in vscode also for python lambda? any documentation on this?
    f
    • 2
    • 6
  • d

    Danny Rivadeneira

    12/13/2021, 8:34 PM
    Hello everyone I am applying test to my sst application I would like to know how I can set environment variables of my .env file. I was hoping to do it this way
    "jest": {
    "setupFiles": ["dotenv/config"]
    }
    but the jest that includes sst has no support for setupFiles
    f
    • 2
    • 1
  • j

    Jacob Hayes

    12/13/2021, 8:40 PM
    Anyone ever had trouble with serverless-bundle packaging a lib? I’m reaching at straws here bc I’m not sure what’s wrong with my approach. I’m specifically working with
    @pdf-lib/fontkit
    If I run directly with node it works correctly but when I go to test locally with
    sls invoke local...
    it doesn’t appear to be pulling the package in. I get
    fontkit.create is not a function
    and it’s as if fontkit doesn’t exist when running this way
    f
    j
    • 3
    • 4
  • k

    Kujtim Hoxha

    12/13/2021, 9:53 PM
    Is it already possible to do this in SST https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html, I was hoping I can use this to filter a dynamodb stream to a function
    s
    • 2
    • 5
  • s

    Sam Hulick

    12/13/2021, 10:11 PM
    anyone know what the corresponding CDK option is for this? it appears to be missing. https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.LifecycleRule.html
    g
    • 2
    • 6
  • m

    Mischa Spiegelmock

    12/14/2021, 3:05 PM
    does SST respect the default region for a given AWS profile from
    ~/.aws/config
    ? seems like no matter what profile i have selected sst always wants to use us-east-1
    t
    • 2
    • 4
  • k

    Kujtim Hoxha

    12/14/2021, 6:05 PM
    Does anyone know a UI client that uses data-api to access aurora serverless?
    t
    m
    • 3
    • 3
  • m

    mkarsene

    12/15/2021, 6:30 AM
    After updating to the latest release 0.54.2, I am getting this memory issue. This is after running npm start, when sst is about to wait for lambda changes...
    t
    • 2
    • 3
  • s

    Sam Hulick

    12/15/2021, 8:25 AM
    I’ve set up a fresh SST project.. can someone remind me how to get proper line numbers (of the actual file, not minified code)
    Copy code
    at Runtime.handler (/Volumes/SuperData/Sites/reelcrafter/v2-presentation2/.sst/artifacts/3fa176ba/src/lambda.js:4066:7)
    t
    t
    • 3
    • 13
  • m

    Mischa Spiegelmock

    12/15/2021, 10:52 AM
    do I need to pass
    App
    down to various constructs (so I can use
    logicalPrefixedName
    )? is there a way to get the “current”
    App
    ?
    t
    • 2
    • 13
  • k

    Kujtim Hoxha

    12/15/2021, 4:51 PM
    Does the SST cli (locally) treat lambda functions that are hooked up to dynamodb streams in any way different from lambda functions that are triggered by api gateway ?
    t
    s
    • 3
    • 26
  • t

    Tim V

    12/15/2021, 5:17 PM
    Heya! I've got API Gateway set up with a simple authorization type that executes a custom lambda authorizer. When the authorizer returns a response to my front end, I'm only getting { message: "Forbidden" }. I'm not seeing the context data that I've added along side of "isAuthorized": true/false. Does anyone know if it's possible to get that context included in the response?
    o
    • 2
    • 4
  • j

    Jack Fraser

    12/15/2021, 5:32 PM
    Anybody got any tips for speeding up CloudFormation deployments?! Unlike other AWS offering you cant seem to pay more to make it go faster!
    m
    f
    • 3
    • 3
1...353637...83Latest