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

    Artem Pabacham

    01/27/2022, 1:02 PM
    Hi everyone. I found that some unnecessary libraries were included in the bundle. In order to analyze it, I need some tools as webpack-bundle-analyzer. Does anybody use smth like that?
    t
    • 2
    • 4
  • j

    Jonathan

    01/27/2022, 1:36 PM
    Hi, I'm trying to use SSM encrypted parameter for one of my secrets that is used in a (cron) Lambda, but when my function attempts to access it using the SDK, it says my Lambda doesn't have permission to access it. Are there any examples of how to give the permission in my infrastructure stack? I'm trying to use option 3 here: https://docs.serverless-stack.com/environment-variables#3-fetch-ssm-values-in-lambda-using-the-aws-sdk
    t
    r
    • 3
    • 11
  • d

    Dan Van Brunt

    01/27/2022, 3:02 PM
    [Opinions Wanted]: We’ve setup an automated transcoder for video. Often our editor’s workflow is to take 30ish videos (each approx ~500MB -> 1GB) and upload the mp4's to an S3 bucket (using an FTP client) this process is drag and drop and the leave alone. As the files end up in S3, MediaConvert Jobs are auto kicked off. Question: How is in-browser upload, restart etc features these days…. I generally feel like doing it in FTP for this part is more reliable than for us add a “video uploader” to our admin interface. Thoughts? Opinions?
    t
    a
    +2
    • 5
    • 6
  • j

    Jakub Przybytek

    01/27/2022, 3:29 PM
    @Frank - probably a typo - your release notes for 0.60.6 says to upgrade with
    npx sst update 0.60.5
    here https://github.com/serverless-stack/serverless-stack/releases
    t
    • 2
    • 1
  • d

    Daniel Gato

    01/27/2022, 5:12 PM
    Is there a way to create a Cf distribution for a S3 bucket with the same configuration than StaticSite? (Https redirection, cors, etc etc) ? Or should I use
    aws-cdk-lib
     » 
    aws_cloudfront
     » 
    Distribution
    instead?
    f
    • 2
    • 4
  • r

    Richard Simpson

    01/27/2022, 9:14 PM
    Does anyone have a solution for renovate/dependabot + SST + aws-cdk-lib and keeping them all in sync? Would I want to exclude
    aws-cdk-lib
    and do something like
    sst update
    in an action when
    sst
    gets bumped?
    f
    • 2
    • 5
  • d

    Dan Van Brunt

    01/27/2022, 9:36 PM
    Anyone know of a good CDK construct for handled the DNS validation for SES? This was the only one I’ve seen yet. Also wasn’t sure if there is a core module that does this already.
    d
    • 2
    • 3
  • d

    Daniel Gato

    01/28/2022, 1:42 PM
    Removing a stack doesn’t remove the IoT Policies. Therefore, we can’t recreate the stacks.
    Copy code
    const iotAuthPolicy = new iot.CfnPolicy(this, 'IotAuthPolicy', {
          policyName: 'iot-auth-policy',
          policyDocument: {
            "Version": "2012-10-17",
            "Statement": [
              {
                "Effect": "Allow",
                "Action": "iot:*",
                "Resource": "*"
              }
            ]
          },
        });
    This policy remains after we remove even when we define:
    Copy code
    if (app.stage !== "prod") {
        app.setDefaultRemovalPolicy(RemovalPolicy.DESTROY);
      }
    • 1
    • 1
  • a

    Alexandru Simandi

    01/28/2022, 1:59 PM
    Hello there! Is there any way to control the name of these with the sst cli? From my understanding it's composed like this
    [stage]-[stack name]-[id]
    I need it to be simply
    aml-person-flow
    as we upload the assets to a custom release manager which requires it to have this name
    f
    • 2
    • 4
  • m

    Michael Robellard

    01/28/2022, 6:11 PM
    So my trouble of the day is I tried to set a custom domain for my api so I could get cookies working correctly. If I have the domain set to api.chartflow.io then everything works, but since I want different APIs for different stages I set the: `customDomain: scope.stage === "prod" ? "api.chartflow.io" : `api.${scope.stage}.chartflow.io`` The problem is when Synthesizing changes I get:
    [Error at /mike-local-chartflow-api-stack/Api] Found zones: [] for dns:<http://mike-local.chartflow.io|mike-local.chartflow.io>, privateZone:undefined, vpcId:undefined, but wanted exactly 1 zone
    Found errors
    d
    f
    j
    • 4
    • 8
  • d

    Daniel Gato

    01/28/2022, 6:49 PM
    What does “Failed to send response because the Lambda function is disconnected” mean for SST?
    r
    p
    • 3
    • 4
  • d

    Daniel Gato

    01/28/2022, 9:00 PM
    I keep getting those:
    daniel-xx-iot failed: Export daniel-xx-iot:ExportsOutputFnGetAttAttachPolicy15792184Arn546FE958 cannot be deleted as it is in use by daniel-xx-api
    And I did not remove anything from iot stack. How can I prevent that?
    f
    t
    • 3
    • 7
  • m

    Manoel Feliciano

    01/28/2022, 9:40 PM
    Hey guys, I have a question. Is it possible to spin up sst just locally without actually deploying to AWS? Something like using sam local?
    t
    • 2
    • 4
  • d

    Derek Kershner

    01/28/2022, 9:50 PM
    Getting a weird error with `0.60.7`:
    Copy code
    Error: Cannot find module './RDS'
    Require stack:
    - /home/dkershner/actions-runner/_work/resonance-webapp-adminidentity-admin/resonance-webapp-adminidentity-admin/node_modules/@serverless-stack/resources/dist/index.js
    - /home/dkershner/actions-runner/_work/resonance-webapp-adminidentity-admin/resonance-webapp-adminidentity-admin/.build/run.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
        at Function.Module._load (internal/modules/cjs/loader.js:746:27)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:93:18)
        at Object.<anonymous> (/home/dkershner/actions-runner/_work/resonance-webapp-adminidentity-admin/resonance-webapp-adminidentity-admin/node_modules/@serverless-stack/resources/src/index.ts:3:1)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:12)
        at Module.require (internal/modules/cjs/loader.js:974:19)
    The code looks good in
    src
    (TS), but the output in
    dist
    is
    Rds
    ... Maybe the deploy box had a cached build folder or something, but I have reinstalled several times, and it always looks this way.
    f
    • 2
    • 7
  • a

    Adam Fanello

    01/29/2022, 12:27 AM
    Spent a couple hours trying to figure out why my new dependency injection via Typescript decorators isn't working. Works in unit tests, but tracked down that metadata isn't getting emitted and it's esbuild's fault. I see a few threads about
    emitDecoratorMetadata
    here in slack and means of providing entire custom esbuild configurations. What is the easiest way to just get this metadata emitted under SST?
    k
    a
    +2
    • 5
    • 29
  • d

    Daniel Gato

    01/29/2022, 6:39 PM
    I’m getting
    Copy code
    {
      "message": "Internal Server Error"
    }
    While on my SST console I get
    Copy code
    da9b1007-54ce-4620-afd7-9c73d987e2d5 RESPONSE {"statusCode":200,"body":{...},"headers":{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Credentials":true,"Content-Type":"application/json"}}
    Does this ring a bell? Furthermore, how should I go at it to debug this kind of errors? When I open my ApiGateway url I indeed see the internal server error
    f
    • 2
    • 7
  • f

    fetian ans

    01/29/2022, 8:05 PM
    Hello Everybody, Can help me to solve this error, Try deploy serverless notes app in basics guide but can't deploy and get this error in photo, help me,
    f
    • 2
    • 1
  • a

    Adrian Schweizer

    01/30/2022, 1:13 PM
    Hey guys, dealing with dynamodb "look up then write" concurrency problem. It seems you can't put both a read and write dynamodb operation in the same transaction, so I've searched a bit for other solution and found the use of a lock flag in a dynamodb table and using a write with conditionexpression to try to acquire the lock, but my question is how to then wait and try to reacquire when lock could not be gotten
    r
    d
    • 3
    • 6
  • j

    Jędrzej Kuryło

    01/30/2022, 3:30 PM
    Hey, I'm having trouble creating a lambda layer containing
    aws-sdk
    . I copied
    node_modules/aws-sdk
    , but now lambdas fail because of some other packages missing, which are dependencies of
    aws-sdk
    . I added the ones that I saw missing in error messages
    jmespath
    and
    xml2js
    to the layer, but now it's failing because of missing
    xmlbuilder
    , which is a dependency of
    xml2js
    ... There must be a better way to do that! 🙃
    f
    • 2
    • 6
  • c

    Chad (cysense)

    01/30/2022, 10:54 PM
    Hey everyone (originally posted in cdk.dev but will try here) Just want to check, every time we build/deploy our CDK app, CDK bundles all of our functions. This occurs even if the function code doesn't change. We have a lot of functions so the bundling takes unnecessary time. Is this just how CDK works? Or do we have something configured incorrectly?
    Copy code
    ...
    Bundling asset BackendStack-sandbox/SharedStack/UserAuthStack/PreSignUpTrigger/Code/Stage...
    
      cdk.out/bundling-temp-e702d83a38335befa2ce80c0d9e739e24affb48fb1dbb835dfcc6cd7abc376aa/index.js  679.8kb
    
    ⚡ Done in 61ms
    Bundling asset BackendStack-sandbox/SharedStack/UserAuthStack/CustomEmailTrigger/Code/Stage...
    
      cdk.out/bundling-temp-c0128579c2ed4649c49753439a981d8b34efb5f71f14c53bac46e41c9fd3d523/index.js  225.1kb
    ...
    We're using 
    @aws-cdk/aws-lambda-go
     and 
    @aws-cdk/aws-lambda-nodejs
     if that changes anything
    f
    • 2
    • 4
  • g

    Garret Harp

    01/30/2022, 11:15 PM
    Anyone have any ideas why this would happen? Just did
    npx create-serverless-stack@0.52.0 test
    to try and test a construct on an older version since I havent taken the time to try and fully upgrade to v2 and getting this:
    f
    t
    • 3
    • 6
  • g

    Gita Alekhya Paul

    01/31/2022, 5:10 AM
    Hi everyone, I have been using
    nodeModules
    option for a Node.js lambda function to entirely include a certain library The
    sst start
    command works perfectly and I have no issues in development, but
    sst deploy
    fails with the following error:
    Copy code
    Preparing your SST app
    Synthesizing CDK
    Building function src/consumers/sumsub.handler
    
    SyntaxError: /DOCUMENTS/SSD/Quinence_Internship/zilliqa-marketplace-monorepo/packages/zilliqa-marketplace-backend/.sst/artifacts/c3a55ae5/package.json: Unexpected end of JSON input
    I noticed that the
    package.json
    referenced in the error is an empty file, not even a
    {}
    Can someone help?
    f
    • 2
    • 2
  • b

    Bshr Ramadan

    01/31/2022, 11:56 AM
    Hello, what are the new things added in
    GraphQLApi
    construct that
    ApolloApi
    doesn't have? because there is no docs for it yet
    t
    • 2
    • 3
  • j

    Jędrzej Kuryło

    01/31/2022, 4:48 PM
    I added NextjsSite to my stack,
    yarn build
    works fine when run in the nextjs app's folder. When I try to build my stack though, I'm getting an error
    Copy code
    Error: There was a problem building the "testapp" NextjsSite.
        at NextjsSite.buildApp (/Users/jedrzej/Workspace/testapp/packages/sst/node_modules/@serverless-stack/resources/src/NextjsSite.ts:600:13)
        at new NextjsSite (/Users/jedrzej/Workspace/testapp/packages/sst/node_modules/@serverless-stack/resources/src/NextjsSite.ts:148:16)
    ...
    I can see output from the next.js being built, there are no errors in there, the output is the same output I see when I build the app manually. Is there a way to get more information about what went wrong? I tried adding some console.logs in
    /Users/jedrzej/Workspace/testapp/packages/sst/node_modules/@serverless-stack/resources/src/NextjsSite.ts
    to see what the original error caught in there was, but for some reason it doesn't have any effect, as if it was cached by nodejs or sth...
    f
    d
    • 3
    • 18
  • s

    Sam Hulick

    01/31/2022, 6:18 PM
    has anyone else been getting these kinds of errors sporadically?
    GraphQL error: The function lambda/graphql/data-sources/track.main failed to build
    just out of nowhere, some functions fail to run.. but then they’ll run again just fine. I’m on 0.60.8
    t
    • 2
    • 5
  • d

    David Garcia

    01/31/2022, 8:24 PM
    Hey, I was never able to resolve this error https://serverless-stack.slack.com/archives/C01JG3B20RY/p1643204224201400?thread_ts=1643127297.129100&amp;cid=C01JG3B20RY I'm having certificate errors during the bundling of a python script for a lambda. It's not entirely clear how to deal with this issue. My latest comments are as far as I got when it comes to gleaning any new details on the problem
    j
    f
    • 3
    • 2
  • m

    Manoel Feliciano

    01/31/2022, 10:17 PM
    Hi guys, I am using SST together with typeorm, but typeorm is unable to find the entities if I define the path for the files. This works normally under jest tests environment though. I took a look at .build folder and saw that only the routes entrypoints are included. Has anyone had this problem before? Any guidance?
    p
    m
    • 3
    • 7
  • t

    Tim V

    01/31/2022, 11:56 PM
    Heya. Regarding Static Site, its internal S3 Bucket... I'm working on an app with a file upload feature and I'm wondering... should be trying to use and parallel purpose the S3 Bucket that gets created in the Static Site, or is it better to make another singleton bucket for the uploads? FWIW, I've tried creating the singleton bucket and passing it to the s3Bucket param of Static Site, but there appears to be two buckets being created, regardless. So it seems like there's not a way to designate an existing bucket for Static Site to use. Does that sound right?
    d
    • 2
    • 2
  • d

    Devin

    02/01/2022, 12:59 AM
    I have a gatsby site that uses
    StaticSite
    and follows the Gatsby instructions pretty closely. I have a problem I don’t know how to solve so I’ll add everything that “seems” relevant. When I look at s3 I can see two folders, which is unexpected. One folder is from the 26th and the other from the 30th (thats “correct”). Nonetheless when I navigate to
    <http://dev.comicshelper.com|dev.comicshelper.com>
    it works, and you can click, blog, and it works great 🎉 However, if you navigate to
    <http://dev.comicshelper.com/blog|dev.comicshelper.com/blog>
    directly, you get a 403. I do see the file
    /blog/index.html
    in s3. Also, if I navigate to
    <http://dev.comicshelper.com/blog/index.html|dev.comicshelper.com/blog/index.html>
    it finds the file and everything works great. Did I maybe misconfigure something in s3 or in route53? This doesn’t seem like a gatsby issue, but maybe I’m wrong or missing something goofy.
    j
    • 2
    • 8
  • b

    Brinsley

    02/01/2022, 11:00 AM
    Hey guys, been playing with the
    Script
    construct as a way of running migrations in a post-deploy process. Anyone know how to get logs from my functions to output in the console?
    j
    f
    • 3
    • 5
1...474849...83Latest