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

    Adam Fanello

    01/21/2022, 5:50 PM
    Anyone else have every
    npm install
    freeze on
    reify:node-sass
    for two minutes every single time. I think it's related to having a react app in my NPM workspace pulling the current version of that, and SST depending on next.js depending on on old version of node-sass that fails to compile.
    t
    d
    +2
    • 5
    • 37
  • a

    Adam Fanello

    01/21/2022, 6:58 PM
    After update to SST v0.60 (CDK v2), any CfnInclude fails to synthesize with this odd error:
    Copy code
    Error: ENOENT: no such file or directory, open '/Users/adam/dev/casa/cloud/.build/cfn-types-2-classes.json'
        at Object.openSync (node:fs:585:3)
        at Object.readFileSync (node:fs:453:35)
        at Object.readJsonSync (/Users/adam/dev/casa/node_modules/aws-cdk-lib/cloudformation-include/lib/file-utils.ts:5:27)
        at loadCfnTypeToL1Mapping (/Users/adam/dev/casa/node_modules/aws-cdk-lib/cloudformation-include/lib/cfn-type-to-l1-mapping.ts:24:17)
        at Object.lookup (/Users/adam/dev/casa/node_modules/aws-cdk-lib/cloudformation-include/lib/cfn-type-to-l1-mapping.ts:17:26)
        at CfnInclude4.getOrCreateResource (/Users/adam/dev/casa/node_modules/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts:503:49)
        at new CfnInclude4 (/Users/adam/dev/casa/node_modules/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts:93:12)
        at new IotDeviceStack (/Users/adam/dev/casa/cloud/src/stacks/iot-device/iot-device.stack.ts:17:5)
        at Object.main (/Users/adam/dev/casa/cloud/src/stacks/index.ts:117:23)
        at Object.<anonymous> (/Users/adam/dev/casa/cloud/.build/run.js:94:16)
    t
    f
    • 3
    • 25
  • s

    Slackbot

    01/21/2022, 7:13 PM
    This message was deleted.
    t
    t
    • 3
    • 16
  • s

    Sam Hulick

    01/21/2022, 7:36 PM
    I’m not sure if this is a real issue yet, but I’ve noticed on occasion, the build process generates invalid source map files. namely, the .js file is lacking the
    //# sourceMappingURL=
    footer. has anyone else noticed this? I’ll keep an eye out if it happens again and see if I can replicate it consistently
    t
    • 2
    • 4
  • s

    Sam Hulick

    01/21/2022, 9:15 PM
    is there a way to do a deploy to CloudFormation and skip the code build step? e.g. if the code has already all been built, but CF failed due to a permission issue or something. then you can just fix the permission and redeploy with the same code
    a
    • 2
    • 5
  • r

    Ross Gerbasi

    01/21/2022, 10:39 PM
    Just realizing today you cant used ENV's from
    .env
    files before a Stack class, they only seem to exist at constructor time. is this expected? seems odd even if I add
    import 'dotenv/config'
    myself to my
    index.ts
    or the stack
    t
    • 2
    • 14
  • r

    Ross Coundon

    01/22/2022, 6:48 AM
    I'm trying to update an existing project to use SST 0.60.4 and CDK v2.7.0 but the deployments are failing with a rather useless "Internal Failure" error. Looking at CloudTrail I've narrowed it down to a failure due to a CreateLogStream event for a log group that already exists which is of the form:
    Copy code
    /aws/vendedlogs/apis/xxxxx/default
    If I delete this log group and run it fails because that log group is missing so I'm a bit stuck. Any thoughts on how to get around this?
    f
    • 2
    • 7
  • g

    gio

    01/22/2022, 9:41 AM
    I get “Extension host terminated unexpectly” every 15 minutes I get this error on VSCode during debugging through
    sst start
    , my SST version is 0.56.2, I user Mac OSX, this is the code on my launch.json:
    Copy code
    {
      "command": "npm start",
      "name": "sst",
      "request": "launch",
      "type": "node-terminal"
    }
    r
    f
    • 3
    • 4
  • d

    Devin

    01/22/2022, 2:52 PM
    SOLVED: I had an errant
    .csv
    file in my app and that broke deployment because computers are complex I have a strange deployment error and can’t seem to make sense of it. 🧵
    d
    f
    • 3
    • 14
  • b

    Baba Yaga

    01/22/2022, 9:27 PM
    I'm trying to get the hello world example working by running
    npx create-serverless-stack@latest --language typescript --use-yarn test
    and then just a
    yarn start
    and getting this error:
    Copy code
    Using stage: test
    Preparing your SST app
    
    =======================
     Deploying debug stack
    =======================
    
    Deploying stacks
    
     ❌  test-test-debug-stack failed: The test-test-debug-stack stack contains no resources.
    
    
    Stack test-test-debug-stack
      Status: failed
      Error: The test-test-debug-stack stack contains no resources.
    
    Failed to deploy debug stack test-test-debug-stack
    error Command failed with exit code 1.
    info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
    j
    f
    • 3
    • 6
  • a

    Adrian Schweizer

    01/23/2022, 3:56 PM
    So I have an api route that I'd normally want to be protected by IAM, but if the user checks a box, I'd want it to be publicly accessible. Any idea how to do that with SST? I've tried setting it to
    authorizationType: sst.ApiAuthorizationType.NONE
    but then in the lambda, the
    requestContext.authorizer
    is actually undefined.
    r
    • 2
    • 5
  • m

    Martin Wawrusch

    01/23/2022, 10:32 PM
    Nevermind, I think I figured it out. reading the docs helps
    f
    • 2
    • 1
  • m

    Marko Bilal

    01/24/2022, 12:19 AM
    theres absolutely no guide as to how to send an error message back
    f
    • 2
    • 10
  • s

    Sam Hulick

    01/24/2022, 1:31 AM
    I’m getting a strange error all of a sudden:
    Copy code
    b4fe69cd-99e0-46bc-9c22-dafcaa3f7907 REQUEST dev-microservices-core-cognitoEmailSender [lambda/auth/cognito-email-sender.main] invoked
    Unhandled Promise Rejection 	{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: Cannot read property 'buildClient' of undefined","reason":"TypeError: Cannot read property 'buildClient' of undefined","promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'buildClient' of undefined","    at process.<anonymous> (file:///Volumes/SuperData/Sites/reelcrafter/v2-microservices/node_modules/@serverless-stack/aws-lambda-ric/lib/index.js:34:23)","    at process.emit (events.js:400:28)","    at process.emit (domain.js:475:12)","    at processPromiseRejections (internal/process/promises.js:245:33)","    at processTicksAndRejections (internal/process/task_queues.js:96:32)"]}
    f
    t
    • 3
    • 18
  • d

    Daniel Gato

    01/24/2022, 6:47 AM
    Is there an option to say “delete EVERYTHING (=Databases, S3, Logs, Policies, etc) if stage is not production).
    f
    • 2
    • 5
  • k

    Krizza

    01/24/2022, 7:34 AM
    Hello, I'm encountering an issue when passing a prop to a stack in Typescript. The code below comes from the vanilla JS guide. In TS, I get the following error:
    Copy code
    Argument of type '{ bucket: sst.Bucket; }' is not assignable to parameter of type 'StackProps'.
      Object literal may only specify known properties, and 'bucket' does not exist in type 'StackProps'.
    a
    b
    • 3
    • 6
  • d

    Daniel Gato

    01/24/2022, 9:40 AM
    I just updated to the latest version of STT (and therefore to CDK too) and now my deploys are failing. On cloud watch I get
    Copy code
    upload failed: ../../tmp/tmpt2vmrmzx/contents/file.txt to <s3://dg-imac-xxx-storage-bucket970c6ada-1gfwpc3jg5cbd/public/demo/file.txt> An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
    I’m using
    Copy code
    new s3deploy.BucketDeployment(this, 'DeployDemoXxx', {
          sources: [s3deploy.Source.asset('./src/deployments/demo/')],
          exclude: ['*'],
          include: ['*.txt'],
          destinationKeyPrefix: 'public/demo/',
          destinationBucket: bucket.s3Bucket,
          accessControl: 'PublicRead',
          contentType: 'plain/text',
        });
    Could that be from because of the upgrade to CDK v2 perhaps?
    f
    j
    • 3
    • 20
  • m

    Marcos Sampaio

    01/24/2022, 1:28 PM
    Hi there, I am using appSync and I can see that SST created an IAM role for me automatically. This IAM role has a trust relationship to appsync.amazonaws.com and permissions to invoke lambda
    lambda:InvokeFunction
    . Is it possible to specify an existent role instead of creating one?
    f
    • 2
    • 6
  • a

    Ash Rhazaly

    01/24/2022, 1:53 PM
    I think this may be a common problem but couldn't find any information on this: Currently running into issues with Jest and external dependencies, wondering if this was documented somewhere on how to overcome it
    r
    t
    • 3
    • 22
  • d

    Dan Van Brunt

    01/24/2022, 2:16 PM
    [Circular Dependency Issue]: Anyone love solving these? 😛 We’re working on an EdgeFunction Construct that should hopefully be able to solve that “can’t immediately delete
    lamda@edge
    functions” issue. But running into a bit of a circular dep issue we’re trying to untangle. Any thoughts?
    d
    • 2
    • 4
  • j

    Jacoby

    01/24/2022, 2:30 PM
    Hello friends 👋 a casual question about cognito + SES: I'm trying to automate enabling SES messaging for my Cognito User Pools, and after googling and searching i've come to the conclusion that there is no easy one-liner solution. In general, my sst/cdk steps to achieve this look something like this: 1. create sst.StaticSite with a custom domain hosted on Route53, 2. create cognito user pool using sst.Auth, 3. create a verified domain identity in SES with a use of AwsCustomResource + create cname records in Route53 so the identity can be verified, 4. switch to SES in my cognito user pool using CustomResource lambda What do you think of this approach? The actual solution are steps 3 and 4, where I wrote some custom cdk/sdk code to enable SES for my user pool. Do you think it could be solved in a simpler way?
    d
    • 2
    • 1
  • s

    Seth Geoghegan

    01/24/2022, 3:20 PM
    I'm getting
    There was an error synthesizing your app
    when performing a
    yarn run start
    . I've deployed this app many times and this is the first time I'm seeing this. However, I can manually
    sst build
    and
    sst deploy
    followed by an
    sst remove
    to remove the deployed app. This appears to be limited to the live lambda dev environment
    f
    • 2
    • 11
  • j

    Jakub Przybytek

    01/24/2022, 3:33 PM
    Hi all, lately I was upgrading my sst from 0.53 to 0.59 with great success (btw, very helpful guide - all clear and easy to apply, thanks!) and after that I have noticed that hot upload of modified files doesn't work anymore and eslint is not run. By hot upload I mean that when
    npm start
    is running then any changes in
    /src
    and
    /stacks
    folder are being detected and applied to my local dev stage automatically. To check if it was just my issue I have created fresh new sst apps (both Java Script and Typescript) and neither hot upload nor eslint is working there. Am I missing something obvious? Or I have to configure those two features by myself now? thanks
    f
    • 2
    • 5
  • k

    Kujtim Hoxha

    01/24/2022, 4:54 PM
    Is there any good way to setup an API endpoint to directly push to SQS ?
    s
    s
    +2
    • 5
    • 14
  • m

    Michael Robellard

    01/24/2022, 9:35 PM
    I added a StaticSite to my SST Stack today and the Cloud Formation seemed to deploy but when I get to the output at the end the output is frozen: Stack mike-local-chartflow-api-stack  Status: deployed  Outputs:   ApiEndpoint: https://xxxxxxxxxxx Stack mike-local-chartflow-site-stack  Status: deployed  VueJSSite: Any ideas of what could be the issue, there is no error message or anything ****** Update - Exited the Deploy and reran and it completed and went to the Live Lambda Dev
    f
    • 2
    • 9
  • g

    Garret Harp

    01/24/2022, 10:04 PM
    Is it not possible to have the
    messageGroupId
    be dynamic based on an event when going from event bridge -> sqs.fifo? Seems pretty useless to have a static message group id for every message 😅
    k
    f
    • 3
    • 4
  • s

    Sam Hulick

    01/24/2022, 11:07 PM
    is
    sst test
    in a working state? when I run it, it just prints “Preparing your SST app” and seems to stop there
    d
    m
    +2
    • 5
    • 31
  • p

    Padraig

    01/24/2022, 11:38 PM
    👋 , Im trying to build a api out with SST, the endpoint does a PUT on dynamodb, it works locally, when i deploy and call the production endpoint from postman, I get the following error
    Copy code
    AccessDeniedException: User: arn:aws:sts::784381721788:assumed-role/prod-hulacorn-api-ApiLambdaPUTvotesidServiceRoleA3-GZY178NMJ59Y/prod-hulacorn-api-ApiLambdaPUTvotesid95CB421A-bePQRQW1c2iD is not authorized to perform: dynamodb:UpdateItem on resource: arn:aws:dynamodb:us-east-1:784381721788:table/Podge-hulacorn-Problems
    Im not using any authentication setup(cognito) I'm using as per the guide
    Copy code
    this.api.attachPermissions([table]);
    anyone got any ideas what might cause this discrepancy?
    o
    d
    +2
    • 5
    • 38
  • m

    Michael Wolfenden

    01/25/2022, 6:09 AM
    👋 When adding a DynamoDB data source to an AppSyncApi, under the covers a role is created that gives access to that particular table. Is this anyway to add additional permissions to this role. In my case I have a request template that modifies multiple tables in a single transaction so I need UpdateItem permissions added to the role for multiple tables.
    f
    • 2
    • 5
  • h

    Haider Abbas

    01/25/2022, 12:20 PM
    Hey Folks, I’m trying to debug a failed options request and a failed post, both with 504. My endpoint method is lambda behind APIGateway and already added in an options response and originally it gave a 200, but I didn’t realize it was supposed to return 204. I’m using {proxy+}, I can see the OPTIONS going through and returning and I can hit it with postman and see it too. But the browser (1st screenshot) isn’t happy with my response, and it’s giving me a timeout on the POST. I don’t know if I don’t have the right format or the right headers or what; I’ve tried a ton of amalgamations. And I tried to do something like on REST, but it doesn’t have those options because it’s HttpAPI, and also have the CORS setup on the API side of things. Below 2nd screenshot it’s not returning anything. I made a custom header with “allow” and got it to add “allow: OPTIONS, GET, HEAD, POST”, but it still didn’t work on the browser. So I’m missing something fundamental here, Normally one doesn’t handle the OPTIONS method at all but in {proxy+}, everything gets forwarded and HttpApi works differently than REST. In theory, my curl response should return something like:
    Copy code
    OPTIONS /resources/post-here/ HTTP/1.1
    Host: bar.example
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Connection: keep-alive
    Origin: <https://foo.example>
    Access-Control-Request-Method: POST
    Access-Control-Request-Headers: X-PINGOTHER, Content-Type
    Any help on this would mean a lot for me. Great Thanks!
    i̇
    o
    +2
    • 5
    • 9
1...454647...83Latest