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

    Blake E

    08/31/2021, 5:40 PM
    So.. I’ve long battled with “custom named” resources with cloudformation, and getting errors like:
    Copy code
    CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename dev-my-stack-myTableName and update the stack again.
    I believe.. cloudformation natively can create dynamic names, or maybe it was CDK POCs I did in the past - can’t seem to remember.
    sst
    have support for this?
    I am still of two minds around whether I like the friction or not, but generally - I don’t lol. I’d prefer cdk/sst/cloudform to pick a name with a custom prefix, like
    dev-my-stack-myTableNameRANDOMISH
    t
    s
    • 3
    • 11
  • b

    Blake E

    08/31/2021, 6:18 PM
    Before I submit a new issue/request - to confirm, we don’t yet have an enum we can use for permissions using the
    grantX
    style? As seen in https://docs.serverless-stack.com/util/Permissions#access-to-a-list-of-specific-permissions-in-a-construct as an interface to https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb.Table.html#grantwbrreadwbrdatagrantee I love typescript for this, and we do see this pattern all over
    sst
    , but not seeing anything on roadmap re: perms/grants
    t
    • 2
    • 4
  • s

    Sam Frampton

    08/31/2021, 7:45 PM
    Can I add request and response mapping templates via sst construct?
    f
    • 2
    • 10
  • a

    Adrián Mouly

    08/31/2021, 8:15 PM
    Anyone having this error? running
    sst test
    .
    f
    t
    • 3
    • 49
  • a

    Adrián Mouly

    09/01/2021, 3:29 AM
    Question regarding environment variables… If I add environment variables on the API construct, and then down the line, I add a new route with
    addRoute
    , which instances a
    Function
    construct, and also defines new environment variables… Are the first ones replaced by the second ones? or both are merged?
    f
    t
    • 3
    • 29
  • a

    Adrián Mouly

    09/01/2021, 7:22 AM
    I’m using BitBucket pipelines, how can I tell to SST to use
    AWS_KEY
    and
    AWS_SECRET
    ?
    f
    • 2
    • 2
  • d

    Drew

    09/01/2021, 7:36 AM
    This chat is full of gems. 💎
    t
    • 2
    • 1
  • d

    Drew

    09/01/2021, 7:40 AM
    Using SST for local dev, my api calls take exactly 5 seconds. I'm wondering if I can make them faster?
    f
    • 2
    • 9
  • a

    Adrián Mouly

    09/01/2021, 7:51 AM
    Is there a way on CF / CDK to tell the system who is the “producer” of a EventBridge event? In my case, I’m producing events from a Lambda…. and other Lambda is subscribed to the same EventBus. This is something that CDK is not reflecting… My stack only reflects the “consumers” of events, but not the “producers” of those events. I want to have it because I want to generate diagrams based on that definition.
    a
    • 2
    • 3
  • a

    Abdul Taleb

    09/02/2021, 3:47 AM
    I'm creating an apollo graphql lambda where the resolvers invoke other lambdas directly. I'm getting a permissions error. Any idea on how to pass the permissions to the resolver lambda. I'm doing this:
    Copy code
    const apollo = new sst.ApolloApi();
    const resolver = new sst.Function();
    
    resolver.attachPermissions([apollo]);
    f
    • 2
    • 7
  • a

    Adrián Mouly

    09/02/2021, 5:24 AM
    This week finally migrated all my stuff from SLS to SST… kind of side-project for fun… but also needed to scale the Platform, we are expecting 2x more services coming soon. So far so good, we only have 7 micro-services, and maybe 30 lambdas in total, 4 or 5 dynamo tables, 2 eventBus, 5 queues, etc… Medium project size I would say, but the code is way cleaner than having segregated SLS config files. With SLS was really hard to share resources/dependencies, not clean and hard to understand for developers with no IaC/CF experience. I’ve been using AWS Console to compare my old/new resources, and all looks fine, the only thing I noticed is my Lambdas size are 2x now, from 2MB on SLS to 4MB on SST. I believe might the due the
    .map
    file is included in the bundle now, and before with SLS might not be there. Is there a real need to include
    .map
    file? I’m not familiarized how to take advantage of it.
    f
    • 2
    • 9
  • a

    Aram

    09/02/2021, 6:28 AM
    Hi guys, Is there a way to call
    npx sst deploy
    and just do a deploy without building it again?
    f
    a
    g
    • 4
    • 15
  • a

    Adrián Mouly

    09/02/2021, 6:45 AM
    Is there a way to retrieve the
    Account ID
    on my stack? I need to build the SQS URL like..
    Copy code
    <https://sqs.ap-southeast-1.amazonaws.com/#{AWS::AccountId}/>
    Wondering if using
    scope.account
    is the actual ID.
    f
    • 2
    • 2
  • c

    Clayton

    09/02/2021, 2:40 PM
    Hi all - What’s the correct way to delete resources when you rename them? (Detail in thread...)
    a
    f
    • 3
    • 14
  • k

    Kujtim Hoxha

    09/02/2021, 3:48 PM
    Does SST work with SSO users (I want to use Control Tower and organisations )
    a
    f
    • 3
    • 30
  • r

    Ross Coundon

    09/02/2021, 7:19 PM
    This is a somewhat fundamental question so bear with me. I'm thinking about if and how we should be dividing up our stacks. Currently we have a single stack and some logic inside of that stack to add resources based on which modules a customer has purchased. I.e. there are some core services and then some optional ones. Each customer has its own AWS account. Would it be an improvement to create a separate stack for each optional module, then perform the logic about which stacks to create in the index.ts entrypoint? If so, I can see this adding some complexity in regard to the sharing of resources, so if this would be a better approach, why is it better?
    t
    j
    • 3
    • 9
  • m

    Michael Orcutt

    09/03/2021, 4:31 PM
    Hey there, are there any plans to support AWS WAF? I'd like to put it in front of our Apollo API
    a
    f
    • 3
    • 6
  • b

    Blake E

    09/03/2021, 6:23 PM
    SST doesn’t yet have a mirror for
    sls logs
    right? (ie. https://www.serverless.com/framework/docs/providers/aws/cli-reference/logs/#aws---logs)
    f
    • 2
    • 16
  • b

    Blake E

    09/03/2021, 9:05 PM
    I’m curious why we build our own path to
    .bin/tsc
    in cdkHelpers.ts vs. letting the system resolve this using $PATH? or other node module resolution strategies? I believe my latest mono-repo issue (rushjs, which symlinks
    node_modules
    ) deals with this “custom” module command resolution for
    tsc
    f
    • 2
    • 9
  • k

    Kujtim Hoxha

    09/03/2021, 9:15 PM
    Interesting thing I ran into, if there is something missing in the CDK context the app builds 2 times
    Copy code
    Some context information is missing. Fetching...
    a
    f
    • 3
    • 8
  • l

    Luke Wyman

    09/04/2021, 2:58 AM
    I'm getting an error when doing a
    npx sst deploy --stage test
    of my monorepo app. CDK is in Typescript, Lambdas are in Python. Things had been pretty smooth with deploying/removing through this morning, and I haven't changed the CDK code in a couple days. Here's the error:
    Copy code
    test-karaoke-auth | CREATE_FAILED | AWS::Lambda::Function | AuthpostConfirmation9638BE34 Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again. (Service: Lambda, Status Code: 400, Request ID: 62093ef6-5fc4-4c34-9fc9-41f040129049, Extended Request ID: null)" (RequestToken: 7ff6ef6c-3053-e0bd-a668-dd1d985361bc, HandlerErrorCode: InvalidRequest)
    Putting other failed Lambda here to preserve:
    Copy code
    test-karaoke-singers | CREATE_FAILED | AWS::Lambda::Function | LambdaPUTkaraokesingerssingerId0B097659 Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again. (Service: Lambda, Status Code: 400, Request ID: 78b004a4-77ed-4336-bc7e-4ce5c5eac1c4, Extended Request ID: null)" (RequestToken: 4529ae3a-b7be-a06a-e162-7a16afd056ee, HandlerErrorCode: InvalidRequest)
    I did a complete deploy before my last git push and deploy and integration tests worked great. The only changes I've made this go around, are to add a non-infrastructure-related domain object with isolated unit tests. It might be not related to sst, since I seem to also have a Python issue where modules in the same folder are not being recognized on imports, but that is happening throughout the project, and only a couple of Lambdas are being rejected on deploy.
    f
    s
    • 3
    • 38
  • f

    Fazi

    09/05/2021, 2:21 PM
    Hi all, I am nearing conversion of my application to SST, but have the following question: I have a deployment pipeline which invokes
    sst deploy
    at the end (once the code is tested etc). Now the issue I run into is the following:
    Integration-api-integration-MyTable already exists
    so
    Failed to deploy the app
    Is it not possible to continually deploy the application? What would be best practice here? Apologies if this has been covered somewhere but I couldn't find it in the docs under the deployment section (or perhaps I misunderstood).
    t
    f
    • 3
    • 13
  • k

    Kevin Baker

    09/06/2021, 3:03 PM
    I am evaluating SST vs Serverless Framework. I have used SF successfully on a few projects in the past. I think I prefer SST especially with its live coding experience and CDK support… however I’m weighing it against the maturity and community side of SF. Does anyone have strong thoughts one way or another that would help me make this decision in a more informed way. Right now I’m focused on POC with SST to be sure it is meeting our need. Any thoughts would be helpful. Also might be good to have a dedicated channel or page on this as I’m sure it’s a common concern. Thanks!
    a
    r
    +2
    • 5
    • 51
  • m

    Mehmet Ali SARAÇ

    09/06/2021, 3:25 PM
    I'm trying to deploy application with codepipeline and I managed to get build sst application with codebuild then result artifact needs to be deployed with cloudformation but I dont know where is the proper cloudformation template in .build folder ? Or which files should be the Artifact ? Can anyone share a solution with codepipeline ?
    f
    • 2
    • 10
  • a

    Abdul Taleb

    09/06/2021, 4:42 PM
    Is there an ApolloApi stack in the works that will support subscriptions via websocket lambda?
    j
    • 2
    • 1
  • a

    Adrián Mouly

    09/06/2021, 9:55 PM
    Is there a way to define properties for ALL the lambdas and somehow share that? Or should I do that sharing a TS
    object
    ? I was expecting to have something like
    defaultFunctionProps
    but at Project level, not only
    Api
    . This is how SLS does it, you can define properties like
    logRetention
    or
    permissions
    at the root level. Toughts?
    t
    • 2
    • 8
  • a

    Adrián Mouly

    09/07/2021, 3:30 AM
    Hey guys, looking for opinions/ideas here… I have some stacks which are “application related”, which are mostly feature-focused, and those rely on some foundational components created outside of SST, and managed from a single legacy SLS project. Those “shared resources” are the VPC, VPN, SecGroup, etc … So I’m thinking to migrate this old-SLS project into SST/CDK, but keeping it separated from my feature-based SST project. The reason is those foundational components I don’t want to be re-created on every PR, or created every time a developer does a local deployment. I want to keep them kind of outside the development flow, and create them only once. What you guys think? should I host these in a separated repo? If I have multiple accounts, one for each environment (dev, stage, prod, etc), I’m planning to share the same VPC/VPN/SecGrousp with every developer over
    dev
    for local development and PRs. Of course each developer is going to have their own stage. Thoughts? 🙂
    s
    f
    • 3
    • 17
  • k

    Kujtim Hoxha

    09/07/2021, 11:20 AM
    Can I set function defaults that only get added to the functions of one stack? E.x I have multiple services and I want defaults for each service stack to be different?
    b
    t
    • 3
    • 7
  • o

    Olivers

    09/07/2021, 1:25 PM
    Hi! I'm using the sst.ApiAuthorizationType.AWS_IAM auth with Typescript and the requestContext.authorizer.iam property is missing from the APIGatewayProxyEventV2 interface. Just jwt is declared. Should I open a GitHub issue with this?
    a
    f
    • 3
    • 58
  • a

    Adrián Mouly

    09/07/2021, 11:26 PM
    Hey guys, I have this command like others suggested, and works perfectly:
    Copy code
    "start": "AWS_PROFILE=development sst start --stage $USER"
    The problem is some of my developers has $USER like
    name.surname
    , then the expression is not valid to name the stage or stack. Any suggestions?
    t
    • 2
    • 9
1...111213...33Latest