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

    Adrián Mouly

    09/08/2021, 2:50 AM
    Can I disable all these outputs created by
    ReactStaticSite
    ? The only one that I’ve defined myself is the last one.
    t
    f
    • 3
    • 18
  • l

    Luke Wyman

    09/08/2021, 3:22 AM
    Fun question for the evening: If sst creates zip files for Lambdas and pushes them up to AWS, then why can I see Docker images being built in the terminal output during the deployment?
    f
    t
    • 3
    • 14
  • j

    JP (junaway)

    09/08/2021, 1:26 PM
    How would I send the websocket API endpoint URL, as environment variable or otherwise, to the lambda acting as server ?
    t
    • 2
    • 21
  • r

    Ross Coundon

    09/08/2021, 2:36 PM
    We had a discussion in here a little while ago about using app.setDefaultFunctionProps to set vpc and security group values by passing a callback function. The way we'd been doing it has broken with the most recent release. We used to be able to define our own type to represent the props that were returned. In the new version the TypeScript compiler complains that what we're returning isn't of type FunctionProps. If we change to the latter version in the snippet it now complains that we cannot assign to props.vpc or props.securityGroups because they're read-only
    t
    • 2
    • 8
  • r

    Ross Coundon

    09/08/2021, 3:43 PM
    I'd like to set a default RemovalPolicy for all the objects in the app based on the name of the stage. If I do:
    Copy code
    if (app.stage.includes('prod')) {
        app.setDefaultRemovalPolicy(RemovalPolicy.RETAIN);
      } else {
        app.setDefaultRemovalPolicy(RemovalPolicy.DESTROY);
      }
    I get the error
    Copy code
    Error: There is already a Construct with name 'AutoDeleteObjectsCustomResource' in Bucket [Bucket]
        at Node.addChild (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/constructs/src/construct.ts:381:13)
        at new Node (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/constructs/src/construct.ts:58:22)
        at new ConstructNode (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@aws-cdk/core/lib/construct-compat.ts:184:24)
        at Object.createNode (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@aws-cdk/core/lib/construct-compat.ts:55:11)
        at new Construct (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/constructs/src/construct.ts:409:26)
        at new Construct (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@aws-cdk/core/lib/construct-compat.ts:52:5)
        at new Resource (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@aws-cdk/core/lib/resource.ts:68:5)
        at new CustomResource (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@aws-cdk/core/lib/custom-resource.ts:30:5)
        at App.applyRemovalPolicy (/Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/resources/src/App.ts:250:30)
        at /Users/rosscoundon/Documents/GitHub/wheres_my_tech/node_modules/@serverless-stack/resources/src/App.ts:270:12
    Is this the right way to do this?
    t
    • 2
    • 7
  • a

    Adrián Mouly

    09/09/2021, 9:41 AM
    Any recommendation on how should I organize my
    index.ts
    file? Currently I have 14 stacks referenced from index, and expecting to double that amount in the next month. My index contains not also the stacks but also the
    addDependency
    for each of them. So currently it’s a mess. I been thinking to create
    function
    s for each of the “Features” that I have, which is basically a grouping of stacks… but to do that I have to create types for each Stack, due most of them has
    readonly
    attributes which are exposed to other stacks. Maybe I can create TS classes? and create
    input
    and
    output
    types? Input will be construct dependencies and output will be anything that has to be shared.
    t
    • 2
    • 23
  • d

    Drew

    09/09/2021, 9:17 PM
    I create my Cloudformation stacks with CDK. I deleted a Cloudformation stack manually. I ran my CDK deploy script again. I expected my CDK/SST deploy to recreate the stacks. ……but the stacks did not get recreated? Why?
    f
    • 2
    • 12
  • a

    Adrián Mouly

    09/10/2021, 7:19 AM
    Somebody using
    WAF v2
    with
    APIGW v2
    ? I’m trying to use both, but my
    httpApi
    is created by SST, and not sure how to get the ARN.
    Copy code
    new waf.CfnWebACLAssociation(this, 'WebACLAssociation', {
          webAclArn: webACL.attrArn,
          resourceArn: 'XXXX',
        });
    I need
    resourceArn
    but not sure how to get it.
    f
    • 2
    • 11
  • d

    Drew

    09/10/2021, 6:10 PM
    Does anyone have a favourite guide on importing existing AWS resources into their CDK/SST cloudformation stacks? I’m trying to recreate VPCS, Route53, and foundational stuff without having to destroy & recreate everything
    f
    a
    j
    • 4
    • 9
  • a

    Adrián Mouly

    09/11/2021, 5:19 AM
    Hey guys, I’m running
    SST CLI
    from the root of my repo, but then I have another
    package.json
    for my Infra in the folder
    infrastructure/
    , and this is where I define dependency
    @serverless-stack/resources
    . Is ok to do that? This means that I have 2
    package.json
    : 1. one at the root level, using
    @serverless-stack/cli
    2. one at the infrastructure project, using
    @serverless-stack/resources
    f
    t
    • 3
    • 8
  • a

    Adrián Mouly

    09/12/2021, 8:48 AM
    Hello guys. Like I’ve said before, I don’t want to create some infrastructure components like ElasticSearch, VPN, VPC every time a new Stage is created. I only want to deploy those services if my stages are “main stages” like “dev, staging, prod”. To do that I’ve been using “lookups”, looking for the VPC ID, or the ElasticSearch Domain…. but to do that lookup I have to store those identifiers in SSM once the “main infrastructure” is deployed. Is OK to do that? Should I rely on SSM to store references to my “main” components? Or there is a better/recommended way to do this?
    r
    t
    s
    • 4
    • 20
  • a

    Adrián Mouly

    09/13/2021, 10:44 AM
    I’m using Lambda to call EventBridge
    putEvents
    . Most of the time works fine, but sometimes when the lambda starts from cold-start I get timeout when calling eventBridge…. it’s like the EventBridge call never ends and this produces a timeout on the lambda/api-gw …. It’s weird because it doesn’t happen all the time. Checked permissions and those are ok.
    a
    f
    • 3
    • 52
  • l

    luke

    09/13/2021, 12:50 PM
    Hey everyone 👋 What are some of the use-cases for
    Script
    that people are trying out? https://docs.serverless-stack.com/constructs/Script
    a
    f
    • 3
    • 6
  • m

    Manuel Villafañe

    09/13/2021, 9:13 PM
    hey everyone, what is the best way to handle the authorization of a user based on the role he has in the db??
    a
    f
    +3
    • 6
    • 28
  • j

    Joel Corona

    09/13/2021, 9:53 PM
    Hi there, is there a possibility of raising several instances of the project locally? If a teammate raises his instance, mine stops it, e.g.
    f
    t
    +2
    • 5
    • 14
  • a

    Adrián Mouly

    09/13/2021, 11:00 PM
    I think this was asked before… Can I define authorizer for my API with
    defaultAuthorizer
    for all the functions and then skip ONE single function to not use it? Maybe adding this on my single function…..?
    Copy code
    authorizationType: ApiAuthorizationType.NONE,
    f
    • 2
    • 2
  • a

    Adrián Mouly

    09/14/2021, 1:20 AM
    I’m trying to call an API GW v2 from a Lambda, but keep getting 403. The GW doesn’t use any type of authentication. I can hit this gateway from Postman just fine, but once the Lambda hits it, it returns 403… Does anybody have an example of Lambda hitting API GW endpoint? The endpoint that I’m hitting looks like this:
    Copy code
    <https://xxxxx.execute-api.ap-southeast-1.amazonaws.com/xxxx/>
    Thanks.
    f
    • 2
    • 4
  • s

    syang

    09/14/2021, 5:19 AM
    I have a non-trivial serverless (sls) stack, can I install SST to enjoy the benefits of live development? I saw ‘migration from serverless framework’ in the document, but it still needs the manual migration. For a large sls project, it sounds quite time consuming, can we get the live development benefits for the existing functions?
    f
    • 2
    • 4
  • j

    Joel Corona

    09/14/2021, 9:13 PM
    Hi there, I have a question, I am working with the latest version of sst with typeorm, now, when I run the migrations it works fine but if I try to run an endpoint I get the following error, do you know why?
    f
    • 2
    • 5
  • o

    Omi Chowdhury

    09/14/2021, 11:30 PM
    Been moving the furniture around with my SLS/SST hybrid app. Now when I run
    sst start
    I get my compiled code turning up outside of the
    .build
    folder. That’s where its supposed to go, right?
    t
    • 2
    • 11
  • d

    Drew

    09/15/2021, 1:59 AM
    For SST/Cloudformation best practices, is it bad to build multiple stacks that depend upon each other? eg. The ARN of an S3 bucket is export into our Lambdas, and now we cannot make modifications to the S3 bucket
    f
    • 2
    • 26
  • l

    Lee Reinhardt

    09/15/2021, 3:05 AM
    heyo, i am looking at creating dynamo tables via
    sst.Table()
    . am i correct in understanding there’s no way to create LSIs from SST? everything in
    secondaryIndexes
    gets created as a GSI (even when re-using the table’s PK). i’m kinda surprised no one’s apparently asked about this on github issues, discussions or even this slack. that makes me think i’m missing something obvious, but i’ve read the docs/source extensively and don’t think so..
    t
    f
    • 3
    • 12
  • b

    Blake E

    09/15/2021, 5:20 PM
    Has anyone looked into OpenAPI/Swagger with cdk/sst ? Feels like we should have all the information available to produce an openapi spec for our
    sst.Api
    constructs
    r
    t
    +7
    • 10
    • 22
  • a

    Adrián Mouly

    09/16/2021, 1:09 PM
    Hey guys, regarding this PR… could be that the new method is missing on the type? I can’t make it work: https://github.com/serverless-stack/serverless-stack/pull/809
    t
    • 2
    • 9
  • j

    Joel Corona

    09/16/2021, 1:50 PM
    Hi devs, how do you implement RBAC?
    t
    o
    +2
    • 5
    • 8
  • a

    Adrián Mouly

    09/16/2021, 2:58 PM
    I see that SST is deploying some functions named
    …LogRetentionaae0aa3c5b4d-9XyoBY3lJCKM
    … Why is that? Just saw this on my Console, I have a bunch of lambdas with.
    log retention
    name.
    t
    f
    • 3
    • 16
  • j

    Joel Corona

    09/16/2021, 8:18 PM
    hi, Is it possible to use a userPool already created in cognito for the auth? without having to create a new one?
    t
    • 2
    • 14
  • l

    Longyang Zhang

    09/17/2021, 4:08 AM
    Hey there, thanks for creating SST which is awesome! I’m trying to work out how AWS CDK works together with SST and just found that
    sst start
    command not watching the code changes anymore if the code located under
    src/notes
    folder. Initially followed the graphql-appsync example which was working fine. Just wondering whether SST supports that? Or maybe something wrong with my setup? Thanks
    f
    • 2
    • 7
  • l

    Luke Wyman

    09/17/2021, 4:27 AM
    Hi @Frank - Wondering if this might be a new feature for Serverless Stack: I think it was a couple of weeks ago that I had been struggling with developing unit testable Python code that could be both reachable from the unit tests covering it, while at the same time, being deployable as a package(s) that the Lambdas can access in their cloud environment. I kinda sorta have that working well enough in my karaoke project (tests run locally and Lambda run in the cloud), but it's clunky and not clean. I built this little spike (raw Lambda/Docker, no sst) to demonstrate packaging unit-testable, non-Lambda Python as a wheel file and copying/installing that into a Docker image with pip. Full description/details in the README. Next, I'm going to see if I can use the custom
    installCommands
    to get those same steps to happen with sst. The thing is, I'm wondering if some take on this could become a feature of sst. Typescript sst projects have their nice, clean way of running tests in
    test
    using Jest, and the
    tsconfig
    et al working the deployment. As it currently stands, coordinating testing and deployment with Python in sst seems a little under-developed by comparison.
    f
    • 2
    • 6
  • p

    Phil Astle

    09/17/2021, 4:04 PM
    If you have CORS set to TRUE on an Api, you still can't use resources across domains because you need to add an OPTIONS route to return 200 and the relevant CORS headers. Would it be worth SST generating default OPTIONS routes and handlers?
    r
    f
    • 3
    • 13
1...121314...33Latest