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

    Josh Moont

    04/06/2022, 4:03 PM
    Hi - just trying out the simple hello world and I'm getting
    Stack 'arn-aws-iam--xxxxxxxxxxx-my-stack' does not exist
    r
    f
    • 3
    • 9
  • j

    Jared Utah

    04/06/2022, 6:16 PM
    OK, I figured it out by looking in the sst-debug.log and a little more googling. Apparently I needed to go into CloudFormation and delete the CDKToolkit Stack that was in there.
    f
    • 2
    • 1
  • r

    Ross Coundon

    04/06/2022, 8:21 PM
    I have a pretty straightforward stack definition to try out a WebSocket API but, when running
    sst start
    it deploys and starts up but then logs the message
    Copy code
    Missing region in config
    and aborts with
    Copy code
    Process finished with exit code 130 (interrupted by signal 2: SIGINT)
    The deploy command I’m using is
    Copy code
    sst start --stage ross-dev --region eu-west-2
    The stack itself looks like this:
    Copy code
    import * as sst from '@serverless-stack/resources';
    
    export default class WebSocketStack extends sst.Stack {
    
      private api: sst.WebSocketApi;
      private connectionsTable: sst.Table;
    
      constructor(scope: <http://sst.App|sst.App>, id: string, props?: sst.StackProps) {
        super(scope, id, props)
    
        this.connectionsTable = this.createConnectionsTable();
        this.api = this.createApi();
        this.api.attachPermissions([this.connectionsTable]);
    
        this.addOutputs({
          ApiEndpoint: this.api.url
        })
      }
    
      private createConnectionsTable(): sst.Table {
        return new sst.Table(this, 'connections-table', {
          fields: {
            PK: sst.TableFieldType.STRING,
            connectionId: sst.TableFieldType.STRING,
          },
          primaryIndex: {
            partitionKey: 'PK',
          }
        })
      }
    
      private createApi(): sst.WebSocketApi {
        return new sst.WebSocketApi(this, 'WebsocketApi', {
          accessLog: false,
          routes: {
            $connect: "src/main/handlers/wsHandlers.webSocketHandler",
            $disconnect: "src/main/handlers/wsHandlers.webSocketHandler",
            sendMessage: "src/main/handlers/wsHandlers.webSocketHandler",
          },
          defaultFunctionProps: {
            environment: {
              CONNECTIONS_TABLE: this.connectionsTable.tableName,
              REGION: this.region,
            },
          }
        })
      }
    }
    Any thoughts on what could be going on?
    t
    f
    j
    • 4
    • 10
  • l

    Luis

    04/06/2022, 9:38 PM
    I'm starting a new project (
    npx create-serverless-stack@latest notes --language typescript
    ), then, after running
    npm run start
    I'm getting
    Missing region in config
    . Does someone know how to fix this?
    a
    j
    f
    • 4
    • 5
  • g

    gio

    04/07/2022, 7:51 AM
    In my SST app, there is a “core bucket” which keep: configuration files, email templates and images. To prevent any manual operation after first deploy, I decided to keep in my monorepo a folder called “assets” which contains a “core-bucket” folder which inside are all files I want to publish on S3. To keep sync this folder and bucket I tried to us S3Deployment cdk construct
    Copy code
    new s3deploy.BucketDeployment(this, 'core-bucket-deployment', {
          sources: [s3deploy.Source.asset('./backend/assets/core-bucket')],
          destinationBucket: this.core_bucket.s3Bucket,
    });
    It works nice but I have a problem about permission, because some of these file (example app-logo.png) I want it with public permission but I can’t find a way to set permission on file. Probably S3Deployment is not a right way to solve my need. Do you know some solution? Actually I think the only solution is to use aws-sdk after cdk bucket creation, to manually set permission on files loaded with S3Deployment, or directly upload that files through sdk.
    r
    f
    • 3
    • 4
  • k

    Kujtim Hoxha

    04/07/2022, 12:25 PM
    Did anyone get PlanetScale + Prisma (or just Prisma) to work with SST?
    t
    f
    • 3
    • 19
  • c

    Casiel Didriksson Muriedas

    04/07/2022, 3:05 PM
    Hello! Any reason why the AppSync construct does not contain a domainName attribute? It's declared on the CDK but can't find it anywhere on the SST construct
    f
    • 2
    • 7
  • s

    Shaun Hurley

    04/07/2022, 5:53 PM
    Hiya folks, I'm playing with the Cognito JWT Authroization example, but trying to use an AuthStack to create the cognito user pool for JWT based authentication. Can make it work, with two caveats 1) I need to manually enable the ALLOW_USER_PASSWORD_AUTH Authentication flow through the cognito console, and 2) Less of a caveat, more of an efficiency thing, the Auth stack creates an Identity Pool for IAM authorization by default, which I'd like to prevent / turn off. Appreciate any thoughts on achieving either of this ends! 🙂
    t
    f
    • 3
    • 7
  • h

    Hans Song

    04/07/2022, 11:55 PM
    hey Guys, i updated sst to
    0.69.5
    but i’m still getting the error addressed in that release when running
    sst start
    f
    • 2
    • 13
  • m

    manitej

    04/08/2022, 3:33 AM
    https://serverless-stack.com/examples/how-to-use-datadog-to-monitor-your-serverless-app.html Check this example for V2 usage of datadog.
    a
    f
    • 3
    • 5
  • i

    Ibrael Espinosa

    04/08/2022, 11:08 AM
    https://github.com/serverless-stack/serverless-stack/issues/1610
    t
    f
    • 3
    • 7
  • s

    Sam Hulick

    04/08/2022, 3:10 PM
    can anyone help with translating this to SST 1.0? (within an
    sst.Api
    definition)
    Copy code
    defaultAuthorizer: new HttpUserPoolAuthorizer(
            'HttpUserPoolAuthorizer',
            props.cognitoAuth.cognitoUserPool!,
            {
              userPoolClients: [props.cognitoAuth.cognitoUserPoolClient!],
            }
          ),
    I’m not sure how to get the issuer and audience from an
    sst.Auth
    instance
    b
    • 2
    • 2
  • s

    Slawomir Stec

    04/08/2022, 4:11 PM
    Hello, I want to use NextjsSite construct with Cognito for a demo. What do you use for Cognito auth in Next.js?
    c
    f
    • 3
    • 6
  • u

    Uday Bhaskar Gajavalli

    04/08/2022, 5:28 PM
    Anyone here could help in providing an example for writing test cases for SQS SendMessage?
    f
    • 2
    • 4
  • s

    Sam Hulick

    04/08/2022, 6:24 PM
    migrating to 1.0 won’t result in any deleting & replacing of resources, will it? sometimes CloudFormation wants to delete/replace something just because a resource name changes. I’m paranoid about it messing up something in production
    t
    f
    • 3
    • 38
  • s

    Sam Hulick

    04/08/2022, 6:31 PM
    I’ll just start a migration thread here, since I’m sure I’ll have more questions.. 🙂 starting with this: I can’t get
    sst.Api
    customDomain working:
    Copy code
    Type '{ cdk: { domainName: string; certificate: acm.ICertificate; }; }' is not assignable to type 'string | ApiDomainProps | undefined'.
          The types of 'cdk.domainName' are incompatible between these types.
            Type 'string' is not assignable to type 'IDomainName'.ts(2345)
    the documentation says domainName can be a string, yet it’s complaining about that
    t
    f
    • 3
    • 11
  • s

    Sam Hulick

    04/08/2022, 7:48 PM
    could someone help me understand the new
    cdk
    property in 1.0? like when defining a new EventBus, there’s
    rules.myRule.pattern
    and
    rules.myRule.cdk.rule.eventPattern
    . why are there two ways to define a pattern?
    f
    • 2
    • 5
  • s

    Sam Hulick

    04/08/2022, 10:28 PM
    is there a way to deploy a stack without having all the Lambda functions build first? like if I was only doing an infrastructure change
    t
    • 2
    • 2
  • c

    Carlos Daniel

    04/09/2022, 2:22 AM
    hey guys I’d like to get some help with AWS organizations I have an account that I use for my personal projects, and I started using AWS Organizations/SSO to kill all of the IAM users I used to have, but now I can’t see the billing dashboard from the accounts logged in through SSO - even though I gave full access to the AWS account and to the billing dashboard. does it require any additional steps?
    t
    • 2
    • 20
  • k

    Karolis Stulgys

    04/09/2022, 8:40 AM
    Is there a way I can execute this command in parallel (so I don't need to wait server to start before start my frontend)?
    "start": "sst start && cd src/frontend && yarn dev",
    r
    • 2
    • 2
  • e

    emmanuel buah

    04/10/2022, 4:22 PM
    Is there a way to change or adjust the behavior of
    esbuild
    in sst. Specifically, how does one use
    --externals
    to control bundling behavior? If not, is the recommended path to run
    sst build/start ..
    on an already transpiled src use the customized
    esbuild
    process.
    r
    t
    f
    • 4
    • 4
  • r

    Robert Chandler

    04/10/2022, 8:43 PM
    When trying to use the
    HttpUserPoolAuthorizer
    from
    @aws-cdk/aws-apigatewayv2-authorizers
    to create a Cognito jwt authoriser I get the following error: Is this a version incompatibility issue between SST and Cognito?
    Copy code
    Error: construct does not have an associated node. All constructs must extend the "Construct" base class
        at Function.of (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/node_modules/constructs/src/construct.ts:30:13)
        at new Node (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/node_modules/constructs/src/construct.ts:75:12)
        at new ConstructNode (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/construct-compat.ts:291:24)
        at Object.createNode (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/construct-compat.ts:78:11)
        at new Construct (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/node_modules/constructs/src/construct.ts:575:26)
        at new Construct (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/construct-compat.ts:75:5)
        at new Resource (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/resource.ts:151:5)
        at new HttpAuthorizer (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/aws-apigatewayv2/lib/http/authorizer.ts:159:5)
        at HttpUserPoolAuthorizer.bind (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/aws-apigatewayv2-authorizers/lib/http/user-pool.ts:59:25)
        at new HttpRoute (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/aws-apigatewayv2-alpha/lib/http/route.ts:196:45)
    f
    t
    • 3
    • 18
  • a

    Alfred Brose

    04/11/2022, 3:45 PM
    Hi all! Currently I'm evaluating SST in combination with Seed.run for customer's project. The project is a completely serverless app consisting of a bunch of lambda function, step functions, api gateway endpoints and some other resources. The lambda functions are either written in "plain" python or python in docker images (containerized lambdas) due to high memory requirements when working with AI models. My question is about unit testing - the python source code including the Pipfile is in the src/<service_name> subfolder. When enabling unit tests in the seed pipeline it only checks for a Pipfile in the project root-directory. At the moment I've added the python unit testing in the pre_deploy stage in the seed.yml. Is there any way to specify the subfolder of the service root dir where the Pipfile is located when configuring the unit tests in the pipeline?
    f
    • 2
    • 3
  • m

    Mischa Spiegelmock

    04/11/2022, 4:26 PM
    Seems like my function defaults (vpc, layers) are not being propagated to my lambda functions created via
    API
    I set the defaults before instantiating the
    APIs
    . it's all one stack SST 0.69.5
    t
    • 2
    • 20
  • v

    Victor Garcia

    04/11/2022, 5:40 PM
    Hi all! I'm trying to set an environment variable for a S3 bucket notification based on another stack and getting a cyclic reference. Is there a way to add the notifications after everything else has been created or another way of doing this? Thanks in advance
    t
    • 2
    • 28
  • m

    Mischa Spiegelmock

    04/11/2022, 6:03 PM
    When I run
    sst deploy
    my function can talk to my RDS DB just fine When doing
    sst start
    ... no dice, the function can't reach RDS anymore
    t
    f
    • 3
    • 25
  • r

    ray

    04/12/2022, 4:18 AM
    Hi, any idea how to add a custom domain to cognito user pool ? If there is an example, it would be best.
    m
    f
    • 3
    • 9
  • u

    Uday Bhaskar Gajavalli

    04/12/2022, 6:49 AM
    Hello, I have created a queue and attached to lambda function but somehow the consumer lambda is invoking twice though I was manually deleting the message after processing. Could any one help me with this?
    f
    j
    • 3
    • 40
  • j

    Jeremy Low

    04/12/2022, 9:40 AM
    Hi team, I am not able to edit custom domains on Seed despite removing custom domain config from my code. I have removed any route 53 records too. But the Seed build log outputs always shows the custom domain while my local build does not. Any advice on this?
    f
    • 2
    • 3
  • g

    Gethyn Jones

    04/12/2022, 11:37 AM
    Hi 👋 I see that a number of people have used Typeorm with SST. When using Typeorm we are seeing lambda cold start times of ~3.5s. Has anyone else experienced this issue or have any suggestions?
    r
    f
    +2
    • 5
    • 56
1...636465...83Latest