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

    Sean Matheson

    11/09/2021, 3:47 PM
    Question: Has anyone been using the
    kysely-data-api
    data provider? If so, how are you finding it? I am keen to use it if ya'll think it's stable enough to do so.
    t
    • 2
    • 6
  • d

    Daniel

    11/09/2021, 6:25 PM
    hey everybody. Long time reader, first time poster 🙂 Does anyone have a good example (preferably Typescript) where they utilize an existing RDS database in their stacks? This is what I have tried so far
    Copy code
    import * as ec2 from '@aws-cdk/aws-ec2';
    import * as rds from '@aws-cdk/aws-rds';
    import * as sst from '@serverless-stack/resources'
    
    import { FixMeLater } from '../src/types/FixMeLater';
    
    export default class RdsStack extends sst.Stack {
      public readonly vpc: FixMeLater
      public readonly rmwDb: FixMeLater
    
      constructor(scope: <http://sst.App|sst.App>, id: string, props?: sst.StackProps) {
        super(scope, id, props)
    
        // Attach to the existing VPC
        this.vpc = ec2.Vpc.fromLookup(this, 'VPC', {
          vpcId: 'vpc-**********'
        })
    
        // Attach to the existing RM Workspace RDS instance
        this.rmwDb = rds.DatabaseInstance.fromDatabaseInstanceAttributes(this, 'RMWDB', {
          instanceIdentifier: '*******-staging-rds',
          instanceEndpointAddress: '********************.<http://rds.amazonaws.com|rds.amazonaws.com>',
          engine: rds.DatabaseInstanceEngine.postgres({
            version: rds.PostgresEngineVersion.VER_11_12
          }),
          securityGroups: [],
          port: 5432
        })
      }
    }
    f
    • 2
    • 4
  • c

    Clayton

    11/09/2021, 11:00 PM
    Is it unnecessary to use the Function construct to create lambdas for functions that are included as routes in SST’s Api construct? It looks like the Api construct may be creating a new lambda for each route automatically (e.g. functionnameEndpoint….)
    m
    f
    r
    • 4
    • 8
  • d

    Dan Van Brunt

    11/10/2021, 2:07 PM
    We are suspecting that SST/CDK is force updating the CF Distro on each deploy even when nothing should have changed. Since this process adds 6mins+ to each deploy we’re interested in how best prove that something is indeed changing for the distro and causing the update to it. Is there something we can use like sst diff or cdk diff ?
    t
    d
    • 3
    • 5
  • s

    Sean Matheson

    11/10/2021, 4:30 PM
    Question: Does anyone utilising the next.js construct avoid the built in API support by Next.js and instead "roll your own" via the Api construct? I feel like this would keep my Next.js app cleaner whilst also giving me more extensibility around the apis.
    t
    • 2
    • 5
  • s

    Sean Matheson

    11/10/2021, 4:44 PM
    Question: How does SST do the lambda bundling? Does it try to inline node deps similar to vercels ncc?
    t
    • 2
    • 2
  • a

    Adrián Mouly

    11/11/2021, 3:45 PM
    Hey guys, Is there a way to “lookup” an already created ACM certificate? I want to assign an existing certificate to my CFront distribution.
    d
    b
    t
    • 4
    • 9
  • s

    Seth Geoghegan

    11/11/2021, 7:11 PM
    There appear to be limitations around the Live Lambda development environment when running in a VPC. For example, I am using MSK (Kafka) as an event source for Lambda. MSK runs within a VPC, so I must configure my Lambda function to work within the VPC to facilitate that communication. The stub lambda that enables the live-lambda environment lives outside of that VPC, which causes the Kafka->Lambda integration to fail when running
    sst start
    .
    a
    a
    +2
    • 5
    • 40
  • d

    David Martin

    11/11/2021, 7:22 PM
    Hey all, I’m having an eslint issue. After upgrading to a version > 0.48, I’m not able to get eslint print error messages properly. I attached a screenshot of what the error output looks like. Note that the errors themselves are not displayed, I’m simply informed that an error exists. But where in my code is the error? Can’t tell. Is the problem with my setup? Or, could it be in SST on this line: https://github.com/serverless-stack/serverless-stack/blob/9a94a549286483fd2a26ec915e864856d9c39c20/packages/resources/src/App.ts#L429-L438 Here’s my eslintConfig:
    "eslintConfig": {
    "parser": "@typescript-eslint/parser",
    "ignorePatterns": ["**/*.js", "**/*/dist", "**/*/node_modules"],
    "rules": {
    "@typescript-eslint/no-floating-promises": ["error"],
    "@typescript-eslint/no-redeclare": ["error"],
    "@typescript-eslint/no-non-null-assertion": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/no-for-in-array": ["error"],
    "@typescript-eslint/no-unused-vars": "off",
    "@typescript-eslint/ban-ts-comment": "off",
    "@typescript-eslint/no-var-requires": "off",
    "@typescript-eslint/explicit-module-boundary-types": "off"
    },
    "extends": ["serverless-stack"],
    "parserOptions": {
    "project": "../../../tsconfig.json"
    }
    }
    t
    • 2
    • 2
  • d

    Dan Van Brunt

    11/12/2021, 7:27 PM
    I think I may have found a bug in how SST runs StaticSite build commands. In Yarn v1 this worked perfectly…. however, in Yarn v2-3 we’re now getting…
    sh: gatsby: command not found
    locally if I run
    yarn build
    (which is the build command we are telling sst to run) then everything works fine. Perhaps this has something to do with how Yarn v2 now handles exposing these depenceny’s bin now? Sound like they are adding the bins to the PATH which I’m guessing maybe SST isn’t making available to the build commands?
    f
    • 2
    • 21
  • ö

    Ömer Toraman

    11/13/2021, 10:06 PM
    What could I be doing wrong here when I’m trying to use an existing EventBus?
    Copy code
    import * as sst from "@serverless-stack/resources"
    import * as events from '@aws-cdk/aws-events'
    
    new sst.EventBus(this, 'myBus', {
        eventBridgeEventBus: {
          eventBusArn: events.EventBus.fromEventBusArn(this, 'ImportedBus', 'eventBusArn'
         }
    })
    Seems the same with an example in the docs: https://docs.serverless-stack.com/constructs/EventBus#importing-an-existing-eventbus
    t
    d
    • 3
    • 38
  • m

    Mike McCall

    11/14/2021, 1:40 AM
    When using the appconfig extension you obtain configuration through http://localhost:2772. This of course does not work with live lambda.
    ö
    s
    • 3
    • 4
  • m

    Mike McCall

    11/14/2021, 2:45 PM
    Looks like the Api construct does not allow you to pass a
    LambdaFunction
    as a function type. It has to be a
    Function
    from sst. However I cannot use sst's
    Function
    as a type in another construct because it is banned. Am I missing something?
    Copy code
    Don't use `Function` as a type. The `Function` type accepts any function-like value.
    It provides no type safety when calling the function, which can be a common source of bugs.
    It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
    If you are expecting the function to accept certain arguments, you should explicitly define the function shape
    t
    • 2
    • 7
  • m

    Mike McCall

    11/14/2021, 3:13 PM
    Found a thread from 12 days ago.
    t
    • 2
    • 2
  • j

    Joe Kendal

    11/14/2021, 9:17 PM
    What are the biggest priorities for SST / SEED right now? Is Nextjs12 planned for next year?
    f
    • 2
    • 2
  • d

    David Martin

    11/15/2021, 12:56 AM
    How do I add caching to my appsync resolvers using the AppSyncApi construct? Previously with serverless I used this plug-in to configure caching:https://github.com/sid88in/serverless-appsync-plugin
    • 1
    • 2
  • r

    Ryan

    11/15/2021, 7:40 AM
    Hi. A quick one hopefully. But I'm stuck on it :) I'm setting up an ApolloApi in a typescript sst project. I want to import typeDefs from a *.graphql file and pass it in when the server is created. Usually I'd set up the webpack loader from the graphql-tag library for this and it would do the required transforms, but I can't figure out where to set up the webpack loader. Has anyone got this working?
    t
    • 2
    • 7
  • u

    Uncharted

    11/15/2021, 1:09 PM
    Hello I'm importing a dynamodb table created with terraform with stream enabled and type to NEW_IMAGE. When I try to import the table and add consumers I have this message : "Please enable the "stream" option to add consumers to the "Table" Is there any workaround or do I have to create the table with sst ?
    t
    f
    • 3
    • 22
  • a

    Adrián Mouly

    11/15/2021, 2:00 PM
    Hello guys. I need to deploy a ReactStaticSite with a
    customDomain
    property, but just to use Certificate and Alias… I don’t have a “domainName” per se in route 53. But this value is required, can be bypassed?
    Copy code
    customDomain: {
            domainName: null,
            alternateNames: [
              '<http://mysite.io|mysite.io>',
            ],
            certificate,
          }
    Is there a way to define this null?
    g
    • 2
    • 9
  • a

    Adrián Mouly

    11/15/2021, 11:30 PM
    Hey guys, I need to expose my eventBridge bus to a legacy PHP application. They want to emit some events there. I’m planning to store the ARN for the bus in SSM, and from PHP they just need to pull that value + a body…. using with AWS SDK for PHP. Is that ok? other ideas?
    g
    • 2
    • 5
  • m

    Muhammad Ali

    11/16/2021, 12:01 AM
    Question regarding setup CI/CD for a project based on SST. What benefits "seed" CI/CD bring to the table over github actions? Given that SST framework already takes care of incremental deployment, why would someone choose "seed" over github actions.
    t
    f
    • 3
    • 5
  • s

    Sean Matheson

    11/16/2021, 8:07 AM
    Howdy all, does the Api construct expose any default environment variables to the underlying lambdas? I am looking for the apiId and region, or the apiEndpoint url. Need to configure a callback in one of the lambdas, and it has to be absolute.
    t
    • 2
    • 4
  • r

    Ryan

    11/16/2021, 2:25 PM
    What's a good approach for managing changes to dynamodb tables? I find that it doesn't take much, and I end up in a complete mess. Then I just tear it all down and put it up again. It feels quite cumbersome in development, and it's not going to fly at all for production. In an SQL world, I'd have a starting point, then run migrations from there and use a framework for managing the migrations. Is there any kind of equivalent for Dynamo that integrates nicely? How do people manage the delta between the tables, keys and indexes defined in the stack, and the current state of the deployed dynamo tables? Everything else I think I've been able to live with quite happy, but dynamos lack of flexibility during development I find crippling. At least when I use CDK/SST it seems like let me change more than 1 GSI at a time. Just for some context, I'm working with a GraphQL, schema first approach with a 1:1 mapping to dynamo tables. But making some changes to the schema is painful 😕
    t
    r
    +3
    • 6
    • 16
  • n

    Nick Laffey

    11/16/2021, 9:58 PM
    It looks like somewhere between v0.48.0 and v0.52.0 the
    --port
    flag on
    sst start
    was removed. Was that intentional? Is there any new way to specify the port being used?
    f
    t
    +2
    • 5
    • 63
  • d

    Drew

    11/16/2021, 11:04 PM
    Anyone tried to run lots of
    sst deploys
    in parallel--and hit AWS RATE LIMITS?
    f
    j
    • 3
    • 20
  • d

    Drew

    11/16/2021, 11:57 PM
    Anyone have some favourite CDK examples of using SST with Secrets manager, parameter store, and IAM permissions? For example, passing configuration around between stacks using SSM, and generating specific IAM permissions for ARNs created in other stacks?
    f
    m
    d
    • 4
    • 7
  • a

    Adrián Mouly

    11/17/2021, 3:59 AM
    Hey guys, My entire stack is written in TypeScript, and my infra done with SST. Now… we hired some machine-learning guys, and they want to use Python… is somebody using a hybrid stack where you have some JS functions living with some other PY functions? Also looking for ideas on how to organize my mono-repo in this situation.
    g
    s
    • 3
    • 3
  • m

    Mike McCall

    11/17/2021, 2:22 PM
    Nudge to update CDK to >= 1.128 This was introduced in 1.128 https://docs.aws.amazon.com/cdk/api/latest/docs/aws-stepfunctions-tasks-readme.html#aws-sdk
    t
    j
    f
    • 4
    • 4
  • a

    Austin

    11/17/2021, 11:00 PM
    Does SST provide any convenience method/command for invoking local functions directly. I understand and see many examples of using integrated services to trigger the local function via the debug stack (APIGW, SQS, all the other things). But I’m curious if there is a more convenient way when working on initial iterations of a function without any triggers yet. I know I can invoke the stub directly from AWS console or using AWS CLI, but does SST provide any type of local invoke command? I couldn’t find anything in the docs, but figured I would ask here.
    t
    f
    +2
    • 5
    • 18
  • l

    Lukasz K

    11/18/2021, 8:55 AM
    Just wanted to mention the traction SST is getting during Serverless sumit 21 - half the stacks people describe in chat/problem resolutions are based on SST :D
    j
    j
    • 3
    • 2
1...192021...33Latest