https://serverless-stack.com/ logo
Join Slack
Powered by
# sst
  • c

    Cristian Pallarés

    01/26/2022, 1:29 PM
    Hi! Not sure if this is the place to ask such a question but… is there any plans to split the current minimal installation into separate packages? it currently requires tons of packages such as apollo, eslint… even if you only use sst.Function, for example
    t
    • 2
    • 4
  • k

    koukito

    01/26/2022, 2:38 PM
    Hi guys, is there a way to add
    replicationRegions: ['us-east-1', 'us-east-2', 'us-west-2'],
    in the dynamoDb table construct? seems like replicationRegions is not in the TableProps type.
    r
    t
    • 3
    • 3
  • f

    Frank

    01/26/2022, 6:46 PM
    Played around with the idea of Lazy value, it seems to help with the case where you have an
    Api
    and a
    StaticSite
    , where the frontend needs to know the API endpoint, and the API needs to know the frontend URL. Sample code here https://gist.github.com/fwang/db1e5697913c5533f8b95a4f04464870
    a
    d
    +2
    • 5
    • 13
  • n

    Nick Laffey

    01/26/2022, 10:18 PM
    Does anyone have any tips for troubleshooting a static site that says it deployed fine but when navigating to the sites URL I get: ``````
    • 1
    • 4
  • a

    Adrián Mouly

    01/26/2022, 11:51 PM
    Hey guys, I’m using Table for DynamoDB and want to setup TTL of 30 days. How to do this with SST/CDK?
    Copy code
    /**
         * The name of TTL attribute.
         *
         * @default - TTL is disabled
         * @stability stable
         */
        readonly timeToLiveAttribute?: string;
    What should be the value?
    a
    d
    m
    • 4
    • 12
  • a

    Adrián Mouly

    01/27/2022, 4:23 AM
    Other question guys… I’m using
    StaticSite
    to deploy my ReactJS site (not using
    ReactSite
    because my app doesn’t use
    create-react-app
    framework. So the problem is I’m having some CORS issues downloading fonts from CFront… is there a way to customize CORS for specific file types? Maybe my CORS policy is dictated by S3?
    f
    d
    • 3
    • 5
  • l

    Lawrence Lau

    01/27/2022, 10:37 AM
    Hi! How do I secure my websocket api created by the debug stack for live lambda development? My actual api gateway endpoints are secured by lambda authorizers, but the websocket api from the debug stack does not have authorizers. I realize it is only a risk when I run sst start locally and the debug session is running. But still if someone somehow knows my websocket endpoint, and the person somehow knows the required values to construct the payload structure as shown here in SST, the person can connect to the websocket api directly to invoke the lambda from my local machine and bypass the authorizer on the api gateway. I tried and it worked. Are there anything in place or any suggestion to secure the websocket api for live lambda development? I know it's a slim risk but I am asking because this is flagged by infosec. If there is no resolution we may have to stop using sst.
    f
    m
    • 3
    • 5
  • k

    Kujtim Hoxha

    01/27/2022, 12:31 PM
    I noticed that during the time a
    StaticSite
    is being deployed the app will not work, I am assuming that some files get changed and some still are the old files and because of the files having the version on the file name (we use vite for building our UI) there is a mismatch and the UI does not load. Has anyone else seen this issue? Any way to prevent this?
    t
    f
    • 3
    • 8
  • r

    Ryan Weaver

    01/27/2022, 3:44 PM
    hi, I'm currently using v0.60.2 and when I'm attaching permissions to different resources no matter if I remove or add the cli does not detect changes and redeploy event after a ctrl+c and restart, any thoughts on this?
    f
    j
    • 3
    • 6
  • r

    Ryan Weaver

    01/27/2022, 7:22 PM
    v0.60.6 is also not picking up changes with the .attachePermissions() function
    f
    • 2
    • 1
  • f

    Fabian Ehringer

    01/27/2022, 9:02 PM
    Hi, we discovered some problems with the current versions of sst (I just upgraded from 0.53 to 0.60) and yarn 3: 1. Every time a lambda is invoked in debug mode (
    sst start
    ) for the first time the console is printing strange messages
    Copy code
    [Module: null prototype] {
      default: { handler: [Getter] },
      handler: [AsyncFunction: handler]
    } handler
    …
    Copy code
    [Module: null prototype] {
      ALGORITHM_IDENTIFIER: undefined,
      ALGORITHM_IDENTIFIER_V4A: undefined,
      ALGORITHM_QUERY_PARAM: undefined,
      ALWAYS_UNSIGNABLE_HEADERS: undefined,
      AMZ_DATE_HEADER: undefined,
      AMZ_DATE_QUERY_PARAM: undefined,
      AUTH_HEADER: undefined,
      AWS_DEFAULT_REGION_ENV: undefined,
      AWS_EXECUTION_ENV: undefined,
      AWS_REGION_ENV: undefined,
      AccountInfo: undefined,
      AdaptiveRetryStrategy: undefined,
      ArchivalSummary: undefined,
      AssumeRoleCommand: undefined,
      AssumeRoleRequest: undefined,
      AssumeRoleResponse: undefined,
      AssumeRoleWithSAMLCommand: undefined,
      AssumeRoleWithSAMLRequest: undefined,
      AssumeRoleWithSAMLResponse: undefined,
      AssumeRoleWithWebIdentityCommand: undefined,
      AssumeRoleWithWebIdentityRequest: undefined,
      AssumeRoleWithWebIdentityResponse: undefined,
      AssumedRoleUser: undefined,
      AttributeDefinition: undefined,
    ...
    2.
    sst update
    does not work. Nothing gets updated 3. Seed sometimes complains about the yarn.lock file being updated during a yarn install, which is not the case. This seems to be a caching issue, since a complete redeploy fixes the problems. This only happens when I promote a from one stage to another. We downgraded to yarn 1 again for now. Edit: Only problem 1 is related to the sst version. It’s not happening in 0.53. Problem 2 and 3 have probably always been there under yarn 3.
    f
    t
    • 3
    • 6
  • a

    Adam Fanello

    01/27/2022, 9:43 PM
    v0.60.6 is mixing versions of aws-cdk-lib, which breaks everything
    Copy code
    % npm ls aws-cdk-lib    
    casa@1.0.0 /Users/adam/dev/casa
    └─┬ @pkg/cloud@1.0.0 -> ./cloud
      ├─┬ @serverless-stack/cli@0.60.6
      │ ├─┬ @aws-cdk/aws-apigatewayv2-alpha@2.7.0-alpha.0
      │ │ └── aws-cdk-lib@2.9.0
      │ ├─┬ @serverless-stack/core@0.60.6
      │ │ └── aws-cdk-lib@2.7.0
      │ └── aws-cdk-lib@2.7.0
      └─┬ @serverless-stack/resources@0.60.6
        ├─┬ @aws-cdk/aws-apigatewayv2-authorizers-alpha@2.7.0-alpha.0
        │ └── aws-cdk-lib@2.9.0 deduped
        ├─┬ @aws-cdk/aws-apigatewayv2-integrations-alpha@2.7.0-alpha.0
        │ └── aws-cdk-lib@2.9.0 deduped
        ├─┬ @aws-cdk/aws-appsync-alpha@2.7.0-alpha.0
        │ └── aws-cdk-lib@2.9.0 deduped
        └── aws-cdk-lib@2.7.0
    f
    • 2
    • 5
  • c

    Cristian Pallarés

    01/27/2022, 10:23 PM
    dumb question but is there a reason for not using peer dependencies for aws-cdk-lib? is it because you can’t guarantee it will still work for newer versions of the package?
    t
    • 2
    • 1
  • s

    Sam Wrigley

    01/28/2022, 1:07 PM
    Hey @Frank, Do you have an update on this open issue (speeding up CloudFront update/invalidation)? We're struggling with fairly slow deployments on Seed (~20mins) and about 50% of that time is spent on the 'Deploy' step. Of this, it seems about 3.5 minutes is spent on
    AWS::CloudFront::Distribution
    . Anything that would help speed up deployments would be hugely helpful for us.
    f
    d
    d
    • 4
    • 27
  • k

    Kujtim Hoxha

    01/28/2022, 5:00 PM
    Hi, so I was looking at the SEED output and was wondering how I could break up my services into many services but still have dependencies to some common stack?
    Copy code
    INFO: Checking for files changes in the ##### service...
    0.07 s
    Skipping the check since there is only one service in your app.
    f
    • 2
    • 5
  • i

    Ivan Roskoshnyi

    01/29/2022, 7:36 AM
    Hi everyone. I am trying to run the same SST app on two machines: MAC and UBUNTU. On MAC everything works ok but on ubuntu not all artifacts are created + I am taking the error that a handler is not exported or undefined. Has anyone faced this issue? stage: dev apig: checked. All routes are deployed succesfully
    a
    • 2
    • 1
  • l

    luke

    01/31/2022, 1:51 PM
    Is there any way to change the handler path for a function post-build. My use case is configuring the New Relic Lambda Extension. This extension expects the function handler to be a method defined in the layer, called
    newrelic-lambda-wrapper.handler
    . But I cannot set this in my stack code (like in this SAM example), as SST will try to do this and fail:
    Copy code
    Building Lambda function newrelic-lambda-wrapper.handler
    
    Error: Cannot find a handler file for "newrelic-lambda-wrapper.handler".
    t
    f
    • 3
    • 7
  • a

    Adrián Mouly

    01/31/2022, 9:41 PM
    Hello there…. Is there a way to configure the
    .env
    files to have some level of hierarchy? Like
    .env
    should be applied always, then on top of it apply
    .<http://env.dev|env.dev>
    if the STAGE=dev …. and so on… I need to do this due I have some env-vars which are repeated across environments/stages.
    a
    s
    r
    • 4
    • 10
  • a

    Adrián Mouly

    01/31/2022, 10:35 PM
    Other question… I’m using StaticSite to build a ReactJS app with Webpack (no CRA used). But I can’t get it to receive my environment variables. I ended up doing this:
    Copy code
    plugins: [
        new Dotenv({
          path: path.join(process.cwd(), `/sst/.env.${process.env.SST_STAGE}`),
        }),
      ],
    But this creates other problems…
    t
    t
    • 3
    • 12
  • d

    Dan Van Brunt

    02/01/2022, 7:15 PM
    [Feature Request - StaticSite]: Can we make deployment prefixes “optional”? https://github.com/serverless-stack/serverless-stack/issues/1323 In-place Deploys: (3mins - avg build time) In the past we have never really been concerned about true blue-green deploys and so our production deploys of our static sites would just use the aws cli to sync and remove orphans with each deploy. sst.StaticSite Deploys: (16mins - avg build time) Contrasting this to us now using 
    sst.StaticSite
     and its use of 
    deployid
     as a bucket prefix. This now means that the CloudFront distro needs to be updated (origin path) so that adds 6-15mins of replication/deploy time. Optional prefixes and us With optional prefixes, I would like to write a CDK construct that handles Cloudfront distro cutovers and true blue-green deploys. We would only do that for production, while dev deploys stay spicy fast. Even without this construct… one could at lease make the deploy prefixes optional for Prod only, again, keeping dev deploy fast.
    • 1
    • 1
  • a

    Adrián Mouly

    02/02/2022, 3:10 AM
    Somebody using Epsagon + Middy?
    d
    o
    s
    • 4
    • 6
  • j

    Jack Fraser

    02/02/2022, 3:04 PM
    S3 bucket having issues for StaticSite - anybody else seeing this issue?
    f
    j
    • 3
    • 13
  • r

    Ross Gerbasi

    02/03/2022, 5:32 PM
    Another suggestion for a new context, ViteSSRSite. This would expect an app using one the vite SSR libraries (https://github.com/vitejs/awesome-vite#libraries) to spit out a single lambda file for the app. With this you could skip the s3 bucket all together and go with just an APIGateway or maybe this could get really fancy and just use cloudfront and run the Lambda @ Edge. Likely could just wrap up what is being done here https://github.com/jamesladd/aws-vite-ssr. An interesting side effect here, since it is a lambda, is it may be able to work via live dev like other lambdas do...
    t
    f
    a
    • 4
    • 4
  • a

    Adam Elmore

    02/04/2022, 1:04 AM
    Do sst nextjs deploys support v12 features (specifically middleware)?
    f
    • 2
    • 4
  • j

    jamlen

    02/04/2022, 5:48 PM
    After updating to
    SST: 0.61.0 CDK: 2.7.0
    I'm now getting
    Copy code
    ✘ [ERROR] Could not resolve "@aws-cdk/aws-lambda"
    
        stacks/index.ts:2:24:
          2 │ import * as lambda from "@aws-cdk/aws-lambda"
    t
    • 2
    • 4
  • d

    Dan Van Brunt

    02/04/2022, 10:26 PM
    [SST Console - Feature Request]: 🙏 • Collapse by default (option) - Would love to be able to see everything collapsed by default (or whatever the user decides) so we can see many events come thru and only care about the FAILED ones. • *Collapsable Console Logs*… it seems only the request and response are collapsible but our console logs are expand only. Would love if these followed the same as the point above. • Clear all logs - Sometimes you just want to clear everything away to only see the new stuff.
    j
    • 2
    • 1
  • s

    Sam Hulick

    02/07/2022, 5:26 AM
    guys guys.. I found a secret backdoor in SST 😮 (half-kidding) after you run
    sst start
    , press spacebar and then backspace, and you get a mysterious
    >
    prompt. doesn’t do anything though actually, @Jay, this is why it takes two ^C’s to kill sst now. once I hit ^C the first time, the weird spacebar/backspace thing doesn’t work anymore. and then the second ^C quits sst. so there’s some kind of prompt process running in addition to
    sst start
    , maybe?
    m
    g
    +2
    • 5
    • 4
  • i

    Ivan Roskoshnyi

    02/07/2022, 8:42 PM
    Hey guys! A simple question. I am trying to add one more account to my aws config/creds and deploy the app to this account but when I hit
    npx sst start
    I am getting
    CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
    I have updated
    app/.env
    file so it looks
    Copy code
    AWS_SDK_LOAD_CONFIG=1
    AWS_PROFILE=profile npx sst start
    but it doesn't work. Am I missing something?
    d
    t
    • 3
    • 13
  • m

    Michael Robellard

    02/08/2022, 12:03 AM
    Help, Everything was going so well today and then this:
    Copy code
    Checking deploy status...
    mike-local-chartflow-dynamodb-stack | UPDATE_IN_PROGRESS | AWS::CloudFormation::Stack | mike-local-chartflow-dynamodb-stack | User Initiated
    mike-local-chartflow-dynamodb-stack | UPDATE_ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | mike-local-chartflow-dynamodb-stack | Export mike-local-chartflow-dynamodb-stack:ExportsOutputRefLookupChartflowDataTableB04292358F7B7CAF cannot be deleted as it is in use by mike-local-chartflow-api-stack
    mike-local-chartflow-dynamodb-stack | UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS | AWS::CloudFormation::Stack | mike-local-chartflow-dynamodb-stack
    mike-local-chartflow-dynamodb-stack | UPDATE_ROLLBACK_COMPLETE | AWS::CloudFormation::Stack | mike-local-chartflow-dynamodb-stack
    
     :x: mike-local-chartflow-dynamodb-stack failed: Export mike-local-chartflow-dynamodb-stack:ExportsOutputRefLookupChartflowDataTableB04292358F7B7CAF cannot be deleted as it is in use by mike-local-chartflow-api-stack
    I had been working on fixing up my deploys and getting them to work on actual aws hardware and had ignored my local environment. When I went to redploy my local environment this evening, I got this message. I have no Idea what to do to fix. Everything is working great on AWS, now I just have to figure out how I broke my local environment
    t
    j
    • 3
    • 6
  • d

    Derek Kershner

    02/08/2022, 5:38 PM
    RE: Lambda ESM Note that I am not looking for help, just sharing Upon conversion to ESM, every graphql resolver fails with the following error:
    {"errorType":"Error","errorMessage":"Dynamic require of \"stream\" is not supported","stack":["Error: Dynamic require of \"stream\" is not supported"," at file:///var/task/src/api/graphql/index.js:1:464"
    I am not sure this is even the fault of the SST implementation, as it happens in AWS itself, but worth knowing perhaps. I am not doing anything with
    stream
    directly myself, so it must be inside apollo or another package.
    t
    r
    s
    • 4
    • 103
1...252627...33Latest