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

    Ross Gerbasi

    04/29/2022, 10:33 PM
    Hey all, curious if anyone has a good workflow for SST local dev and working with s3 files. I would like to have a bunch of JSON files in a local folder, read/write to them locally when doing local dev. Then when I deploy I would like those files to be sync'd to an s3 bucket and my read/write to work against s3. Maybe everything needs to be on s3, even during local dev? Any ideas on a clean way to work this?
    r
    f
    • 3
    • 7
  • a

    Arpad

    04/29/2022, 10:35 PM
    Has anyone ever experienced inconsistent deploys between CI and local deploy? I’m deploying a fargate service and deploys from my local work fine, but the exact same commit is stuck in UPDATE_IN_PROGRESS for the ecs service (i let it time out once, 3hrs I think it took)… the weird thing is that this suddenly happened and I can’t find a cause for such a problem.
    f
    • 2
    • 2
  • k

    Karolis Stulgys

    04/30/2022, 11:00 AM
    I try to deploy frontend stack but get
    Invalid request provided: One or more of the CNAMEs you provided are already associated with a different resource.
    where should I go and what should I delete?
    f
    • 2
    • 2
  • l

    lgupta

    04/30/2022, 5:38 PM
    Hi everyone, I am trying to add redis to my stack. Is there a way to get the VPC and subnets that were created and use them for redis. I looked around and cannot find a way to get vpc. Thanks
    t
    a
    +2
    • 5
    • 17
  • l

    Lewis Eccles

    05/01/2022, 6:46 AM
    Hey everyone, Been trying to work with AppSync on SST, ran into an issue where in the SST console - My GraphiQL interface doesn't seem to load via SST console in the browser or via directly visiting my https://<aws appsycn generatedurl>/graphql endpoint output by my stack. See attached screenshot of the SST console. Literally upon load it reports the error and also won't load any schema info
    Copy code
    "error": "Unexpected token < in JSON at position 0"
    The 2nd screenshot is attempting to load the interface within the browser. The only way I can interact with the GraphQL api is via the AWS console "AppSync" console where it works fine, loads the schema, I can perform queries & mutations etc. As well as use the Appsync console to authenticate users Any one else ran into anything similar? ------ UPDATE ------ Ok quite a silly mistake on my part. I figured out how to load the UI for GraphQL in SST Console - I had to manually put my output of the GraphQL URL into SST Console, and additionally add a HTTP header to my request.
    Copy code
    {
      "x-api-key": "input output API key Here"
    }
    f
    • 2
    • 2
  • a

    Adrián Mouly

    05/02/2022, 5:06 AM
    Hey guys, My “sst build” command is not showing me these kind of errors. It builds the project correctly, and doesn’t fail. I would like to have a failed build in case the contracts are not met. Is there a way that I can setup it?
    t
    • 2
    • 10
  • k

    Karolis Stulgys

    05/02/2022, 6:28 AM
    Hi 👋 I try todo
    auth
    as as in the guide but with
    nextjs
    and I get an issue when I use Amplify on the frontend and try to deploy the stack.
    Copy code
    Error: Command failed with exit code 1: ./node_modules/.bin/next build
    warn  - The `target` config is deprecated and will be removed in a future version.
    See more info here <https://nextjs.org/docs/messages/deprecated-target-config>
    warn  - Compiled with warnings
    • I use all the latest packages in my package.json • I have ssr:true in Amplify config • It builds fine if I run build locally for the frontend • It deploys fine if I remove Amplify config from the frontend I understand this might not be related to sst but maybe someone had this issue and somehow resolved?
    f
    • 2
    • 4
  • a

    Art Kelly

    05/02/2022, 10:53 AM
    Hello everyone, Does anyone know why the permissions might not be attaching to the lambda function set at this route Im trying to extend one of the examples and have a lambda which I would like to return a list of all the users in the user pool, however, the iam policy isn't applied to the api route
    Copy code
    // Create an HTTP API
        const api = new sst.Api(this, "Api", {
          // Secure it with IAM Auth
          defaultAuthorizationType: sst.ApiAuthorizationType.AWS_IAM,
          routes: {
            "GET /private": "src/private.handler",
            // Make an endpoint public
            "GET /public": {
              function: "src/public.handler",
              authorizationType: sst.ApiAuthorizationType.NONE,
            },
            "GET /cognito": {
              function: { 
                srcPath: "src/",
                handler: "getCognito.handler",
                environment: {
                  "userPoolId": auth.cognitoUserPool?.userPoolId ?? ""
                },
              },
              authorizationType: sst.ApiAuthorizationType.NONE,
            } 
          },
        });
    
        api.attachPermissionsToRoute("GET /cognito", [
          new iam.PolicyStatement({
            actions: ["cognito-idp:ListUsers"],
            effect: iam.Effect.ALLOW,
            resources: [
              `arn:aws:cognito-idp:${this.region}:${this.account}:userpool:${auth.cognitoUserPool?.userPoolId}/*`,
            ],
          }),
        ])
    k
    f
    • 3
    • 6
  • r

    Ryan Barnes

    05/02/2022, 1:38 PM
    Hey team I'm having a little trouble with debugging my graphql lambda. I'm trying to implement typegraphql and getting some errors. The problem is, I can only see these errors on 'production'
    npx sst deploy --stage prod
    . I cannot see errors on the debugging stack
    npx sst start
    . When I start the debugging stack and query my graphql lambda all I can see from the browser is
    {"message":"Internal Server Error"}
    and all I see from the command line is
    Copy code
    8e29906c-8622-4ab7-98fd-5bbcb2c97764 REQUEST dummy-graphql-apollo-my-s-ApolloApiLambdaGET95C283-IaPKrXb9HmmO [src/lambda.handler] invoked by API GET /
    and eventually I'll see this (looks like the call to the lambda just times out)
    Copy code
    e30f62ab-2b81-4c6d-8fea-80baf75a8846-1651498094641 Failed to send a response because the Lambda Function timed out. If this happens again, you can increase the function timeout or use the --increase-timeout option with "sst start". Read more about the option here: <https://docs.serverless-stack.com/packages/cli#options>
    However if I deploy this to prod I see a real error, I can paste in thread. This is a small git repo that should replicate the issue https://github.com/unwrap-nlp/graphql-apollo Do you mind helping me figure out how to see errors in the debugging stack?
    f
    t
    • 3
    • 25
  • c

    Chad (cysense)

    05/02/2022, 3:27 PM
    Does anyone have examples of storing
    env
    variables in SSM? How are these initially loaded? Do you put all SSM params in one stack or is this integrated into your other stacks? Do you load them from env var file and then set them or set them in the UI?
    t
    c
    a
    • 4
    • 18
  • k

    Kesley David DEV

    05/02/2022, 6:24 PM
    Good afternoon everyone, I have a backend that I need to duplicate. Normally I would install the serverless lib in my terminal, and run a
    serverless deploy
    , and my functions would be pushed to lambda in my aws account. But I'm checking, there were big changes. Is it possible for me to deploy my api like I did before? at least initially for me to plan for migration?
    t
    f
    • 3
    • 7
  • s

    Scott

    05/03/2022, 1:08 AM
    Has anyone had recent luck with getting typeORM implemented with SST? I've tried previously mentioned solutions for externalModules/nodeModules for pg-native but cannot seem to by-pass the error when running sst build/seed deploy:
    Copy code
    Error: There was a problem transpiling the Lambda handler: > node_modules/pg/lib/native/client.js:4:21: error: Could not resolve "pg-native" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
        4 │ var Native = require('pg-native')
    Note - The above works locally with sst start I've also tried an alternative solution which involves having a mocked pg-native library (which just returns an empty module). This actually works with sst build & seed deploy, BUT then sst start runs into issues running typeORM locally. See attached error. I'm currently at a stand still of either typeORM works locally OR online, but have been unable to find a solution that works for both.
    y
    f
    t
    • 4
    • 11
  • k

    Karolis Stulgys

    05/03/2022, 7:19 AM
    👋 Did anyone successfully completed the tutorial with
    nextjs
    instead of
    create-react-app
    ? I get issues with deployment with auth (Amplify). Locally things works fine. Here's my previous thread: https://serverless-stack.slack.com/archives/C01JG3B20RY/p1651472910967679
    s
    k
    • 3
    • 23
  • r

    Rob N

    05/03/2022, 2:58 PM
    Does anyone know where the
    .dockerignore
    should be placed to be picked up by the SST/CDK build of a docker lambda function?
    a
    f
    • 3
    • 5
  • d

    Dan Van Brunt

    05/03/2022, 4:58 PM
    Anyone know if these route53.HttpsRedirect preserve the path on a url? Eg.
    <https://domain.com/blah>
    to
    <https://www.domain.com/blah>
    t
    f
    • 3
    • 5
  • b

    Brett Fieber

    05/03/2022, 7:09 PM
    Serverless-framework expects the values at
    vpc.securityGroupIds
    &
    vpv.subnetIds
    to be Arrays. The easier solution is just wrap your
    ${ssm:...}
    calls in `[]`'s So for example:
    Copy code
    vpc:
      securityGroupIds: [${ssm:terraform-output/$self:provider.stage}/vpc/security-groups/default/id/value}]
      subnetIds: [${ssm:terraform-output/$self:provider.stage}/vpc/subnets/private/ids/value}]
    r
    t
    • 3
    • 5
  • j

    Jarod Stewart

    05/03/2022, 9:04 PM
    Anyone add
    constructs
    as a dev dependency and then have type issues on
    stack
    when used on SST components?
    f
    • 2
    • 5
  • j

    Jeff Hanna

    05/03/2022, 11:20 PM
    hey guys! Sorry if this is off topic, but hoping someone can point me in the right direction 🙏 I want to create API Keys to allow customers to use our API. I’ve set that up and it was super easy 👍 but what is best practice for how to identify the customer by their API key?
    o
    j
    f
    • 4
    • 6
  • j

    Justin Robinson

    05/04/2022, 12:32 PM
    Anyone else having issues with debugging in vscode, debug panel buttons become unresponsive and requires vscode to be killed.
    r
    f
    • 3
    • 5
  • r

    Robert

    05/04/2022, 1:21 PM
    Morning guys! I have a service which is 100% handle by Seed. I am trying to add a new service, Seed see them both and my pipeline is successful, but Seed does not seem to see my two new endpoints so I can configure my domain on them. Anyone has any idea if I have to do anything special for Seed to see them? Pretty sure I never had to do anything special before. I was just going into
    Settings / Edit Custom Domains
    Thank you in advance!
    f
    r
    • 3
    • 3
  • r

    Rohith Gilla

    05/04/2022, 1:53 PM
    Hello team, I have added my domain to Route 53 in a hosted zone. For testing I have deployed once in testing and it worked but from next deploy getting this error.
    Copy code
    It seems you are configuring custom domains for you URL. And SST is not able to find the hosted zone "<http://app-serverless-cli.text-shot.com|app-serverless-cli.text-shot.com>" in your AWS Route 53 account. Please double check and make sure the zone exists, or pass in a different zone.
    I tried deleting
    npx sst remove — stage  {my stage name}
    but still same issues.
    t
    b
    • 3
    • 24
  • s

    Seth Geoghegan

    05/04/2022, 2:30 PM
    I'm trying out the new functional stack approach with SST 1.0.0 and could use a pointer on sharing resources across stacks.
    a
    c
    +3
    • 6
    • 57
  • s

    Seth Geoghegan

    05/04/2022, 5:46 PM
    Should I be able to deploy a single stack by name using functional stacks? For example, if I have
    app.stack(StackA).stack(StackB).stack(StackC)
    , should I be able to deploy stackB to a
    shared
    stage?
    Copy code
    yarn run sst deploy stackB --stage=shared
    Based on the error message I'm receiving, I cannot:
    Copy code
    Stack shared-my-service-stackname is not found in your app.
    I know I can deploy the entire app to the
    shared
    stage, but that's not what I want here
    t
    • 2
    • 2
  • l

    lgupta

    05/04/2022, 7:29 PM
    Hi @thdxr, I am trying to implement https://github.com/serverless-stack/kysely-data-api and getting the following error. I can confirm that the module does exist in node_modules. Thanks
    Copy code
    error - Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/lgupta/Documents/Projects/checkout-com-payments-app/node_modules/kysely-data-api/dist/esm/data-api-driver' imported from /Users/lgupta/Documents/Projects/checkout-com-payments-app/node_modules/kysely-data-api/dist/esm/data-api-dialect.js
    t
    • 2
    • 2
  • a

    Adam Fanello

    05/04/2022, 11:42 PM
    v1 upgrade: • I can't find a replacement for CORS
    allowMethods: [CorsHttpMethod.ANY],
    . A value of
    ["*"]
    should (less clearly) do it, but that isn't an accepted value. I see SST is using CorsHttpMethod internally, but won't let me.
    t
    d
    • 3
    • 16
  • d

    Derek Kershner

    05/04/2022, 11:51 PM
    v1 upgrade: • Is the lack of support for
    events.CronOptions
    intentional for
    sst.Cron.schedule
    ? Seems like a huge loss for the only composable way to create a schedule to be gone.
    t
    f
    r
    • 4
    • 36
  • a

    Ash Rhazaly

    05/05/2022, 7:46 AM
    v1 upgrade: •
    PolicyStatement
    not an acceptable type in
    Permissions
    ?
    f
    • 2
    • 7
  • r

    Robert

    05/05/2022, 8:12 PM
    Anyone has a link to a good guide if I want to transform all the API in my serverless.yml into some SST stacks? Most of my endpoints are authorised with Cognito.
    s
    f
    • 3
    • 4
  • a

    Adrian Schweizer

    05/05/2022, 8:19 PM
    has anyone successfully deployed an open source CMS (something like contentful or webiny) with SST?
    g
    f
    • 3
    • 8
  • a

    Alexandru Simandi

    05/05/2022, 8:29 PM
    Congratz on 1.0!!! I started with 0.39 on a small company project. Now I plan to make it the core of our tech stack for all new projects. The .cdk prop on the constructs is more than welcomed 😄 The upgrade to
    1.0.2
    went fine up to this error that I cannot wrap my head around, used to work fine on
    0.65.5
    Copy code
    node_modules/aws-cdk/lib/diff.d.ts:1:26 - error TS2307: Cannot find module '@aws-cdk/cloudformation-diff' or its corresponding type declarations.
    
    1 import * as cfnDiff from '@aws-cdk/cloudformation-diff';
    The current fix is to install the dependency myself:
    "@aws-cdk/cloudformation-diff": "2.23.0"
    , is this a bug on aws side?
    f
    • 2
    • 5
1...686970...83Latest