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

    Julien Goux

    02/23/2021, 10:44 AM
    When defining a vpc, there is the maxAzs option set to 3, I’m not sure I get what is a availability zone 🤔
    r
    • 2
    • 1
  • j

    Julien Goux

    02/23/2021, 10:48 AM
    I guess a single AZ is impossible/bad? 😛
    m
    • 2
    • 1
  • p

    Pål Brattberg

    02/23/2021, 3:42 PM
    I just upgraded to 0.9.5 and I get hit with these two stopping errors: error: Transforming for-await loops to the configured target environment is not supported yet error: Transforming async generator functions to the configured target environment is not supported yet Reverting back to 0.9.0 lets me run ok again.
    f
    j
    • 3
    • 9
  • e

    Erick Ho

    02/24/2021, 12:38 AM
    Hey y'all, is there a way to deploy a specific stack using SST? In CDK you could do 'cdk deploy
    stackname
    ' to deploy a specific stack
    f
    • 2
    • 3
  • b

    Bill

    02/24/2021, 12:54 AM
    Noob question alert: How do I add a package to lambda function in SST? Does it go in the root package.json?
    f
    • 2
    • 7
  • p

    Pål Brattberg

    02/25/2021, 1:36 PM
    Howdy! Anybody has example of how to package extra files for a Function? I need to include a local json-file with my function
    j
    • 2
    • 1
  • c

    Camilo Rios

    02/26/2021, 3:09 PM
    Hi guys! I'm getting an error when trying to use an existing Api Gateway inside a different serverless.yml:
    ApiGatewayRestApi - 1 validation error detected: Value null at 'createRestApiInput.name' failed to satisfy constraint: Member must not be null
    Has anyone of you seeing a similar error?
    o
    a
    f
    • 4
    • 15
  • a

    Andreas

    02/28/2021, 12:31 AM
    I don't know if this is expected behavior, but when I set environment variables in defaultFunctionProps I don't get them in functions I set with the "function" option. Example:
    j
    f
    • 3
    • 16
  • m

    MAURICIO VALDIVIA MONZON

    03/01/2021, 5:56 PM
    Hi! I'm wondering if exist a grapqhql example? And if I should do all the business logic in the same grapqh lambda or in different lambdas.
    o
    • 2
    • 6
  • r

    Roger Rajaratnam

    03/01/2021, 6:17 PM
    Does anyone have a good resource for adding role based access to api endpoints?
    f
    m
    • 3
    • 41
  • d

    David Marquez

    03/02/2021, 9:19 AM
    Hey guys, had a question. I've got four environments on SEED (dev, dev1 for another dev, staging, and prod). Now I know by virtue of SEED handling my stage and prod environments, the
    sst.json
    stage becomes irrelevant (or does it?). But my issue is rather on merging changes between the dev and dev1 branches where we're overriding the
    sst.json
    and bouncing back and forth between
    dev
    and
    dev1
    . How do I go about this or is there a better approach to this? Perhaps more insight as well into how SEED manages the sst.json file would be great.
    Copy code
    {
      "name": "beta-courier",
      "stage": "dev",
      "region": "ap-southeast-1",
      "lint": true
    }
    j
    • 2
    • 1
  • d

    Dries Hooghe

    03/02/2021, 1:11 PM
    Hi! We have a project in which we deploy our CDK infrastructure, followed by several services. However, we (quite often) encounter the
    A version for this Lambda function exists
    issue, which is caused by deploying functions that are not changed. However, since our project is setup as a monorepo with Lerna and Yarn workspaces, and we don't want to tag each service separately, we have no way of telling which services to skip while deploying. Is there any way to avoid this? The Common Serverless Errors documentation suggests deploying a dummy change, but at the rate we get this issue, it has become quite a hassle.
    j
    f
    • 3
    • 3
  • v

    Vignesh Rajagopalan

    03/03/2021, 12:02 PM
    Does SST support reading secrets from SSM?
    f
    s
    • 3
    • 4
  • m

    Mike McCall

    03/03/2021, 1:21 PM
    sst start is crashing with
    Copy code
    TypeError: Cannot read property 'type' of undefined
        at returnLambdaResponse (/Users/mike/shoplifted-apps/auto-tags/node_modules/@serverless-stack/cli/scripts/start.js:1128:24)
        at ChildProcess.<anonymous> (/Users/mike/shoplifted-apps/auto-tags/node_modules/@serverless-stack/cli/scripts/start.js:1165:5)
        at ChildProcess.emit (events.js:315:20)
        at ChildProcess.EventEmitter.emit (domain.js:483:12)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    This is happening in live lambda dev. It happens inside an iframe as a shopify app. If I hit the same endpoint outside of the iframe it works. If I deploy the api it also works. Only fails in live lambda.
    f
    p
    • 3
    • 24
  • a

    Akos

    03/03/2021, 7:45 PM
    👋 Hey everyone! SST is great, I've been researching it for the past few days – super impressed by the live reload feature. We're just about to embark on the serverless journey and are quickly evaluating the tooling/solutions out there. One thing though that is a bit of an open question is: how would SST work with a modular monorepo structure using lerna or yarn? I've read this handy guide and looked at the serverless-lerna-yarn-starter, but it uses
    serverless.yml
    everywhere and not
    sst.json
    . Does anyone have an example with SST? Or am I just overthinking it and it will just work fine if I just use SST in each
    service
    ?
    f
    • 2
    • 40
  • s

    Sione

    03/04/2021, 4:11 AM
    Hey @Frank, I wanna piggyback off your convo with @Akos on the above thread ^, mainly for clarification. It's very helpful because I'm migrating a monorepo with sls to use sst. How I've done it so far is that each service is a sst app under a monorepo. It's been tricky like for one I had to reference typescript types to the root because of hoisting to make testing work. But from the thread, as I understand, it can be just one sst app at the root and each service with its stack define in the
    /lib
    dir. Now if that's the case then there's no need for monorepo then, right? for each service to have its own
    package.json
    or does it still make sense for each service to have it's own
    package.json
    with lerna to control hoisting? Also, I'm using seed and I haven't deploy my sst app yet. But when adding a service on seed, is it looking for the service dir still or the stack file in
    /lib
    dir? Overall, I think an example of sst app that spans multiple services would be very helpful.
    f
    • 2
    • 11
  • t

    Tom Hoad

    03/04/2021, 9:56 AM
    Does the name (i.e. type=string) option in https://docs.serverless-stack.com/util/Permissions#permission just give wildcard permissions to that resource (e.g.
    s3
    ===
    s3:*
    )? And if so, to add more granular permissions per action, I need to add a full policy statement - is this correct?
    f
    • 2
    • 8
  • a

    Andreas

    03/04/2021, 11:55 PM
    I've been trying to get apollo-server-lambda working with the SST, but I'm running into some problems. I have tried deploying it as a sst.Function with a apigateway.LambdaRestApi and with sst.Api (had to change to ApiPayloadFormatVersion v1 to get it working) with no luck. I get the graphql playground running on the endpoint url, but get a
    RESPONSE null
    when querying for the schema. No other errors. Any ideas what I'm missing here? Here's a basic example using it with the CDK: https://github.com/tlakomy/cdk-graphql-lambda-example
    f
    m
    a
    • 4
    • 32
  • r

    Ross Coundon

    03/05/2021, 12:41 PM
    Is there a way in Seed to apply a facade-style pattern using pre-build or pre-compile tasks (or other mechanism)? What I mean by that is we have a Github repo with the main application code in it that will get deployed. Then each customer has its own configuration to apply on top of the code in that repo. What we do in the front-end (which is deployed via Netlify) is to provide a JavaScript file in the core repo that uses some enviroment variables that contain a Git access token, and the name of a customer repo. Then instead of running
    Copy code
    npm run build
    we have a separate NPM script that calls the Javascript file say
    Copy code
    npm run config
    which actually does:
    Copy code
    node buildClientApp.js
    buildClientApp.js retrieves the config using Octokit from the provided repo and then runs npm run build on the combined config and core code. This output is then what is deployed. Does anyone have any pointers on how this could be achieved in Seed for the backend lambda code?
    j
    • 2
    • 5
  • r

    Ross Coundon

    03/06/2021, 9:01 AM
    So, I’m considering migrating our serverless.ts defined projects to use SST. I don’t yet have any experience of using AWS CDK or SST so have a question before I dive in. In our serverless.ts definition we define lots of resources to do with the VPC - e.g. subnets, NAT Gateways, NACLs, security groups, and also Aurora RDS definition. As far as I can tell, these would need to be defined using CDK rather than SST. Is there a recommended way to achieve this using SST and CDK together, I couldn’t see anything in the docs so thought I’d ask the experts here?
    f
    • 2
    • 31
  • g

    gio

    03/07/2021, 9:48 AM
    Is there any repo for the usage of this library to invoke API signing request with sigv4 (IAM)? I’m having some issue to recognized types used and which packages I have to import. Are there constructs from aws amplify?
    f
    j
    c
    • 4
    • 4
  • r

    Rupert Smith

    03/07/2021, 1:14 PM
    Hi, I am having a problem creating a VPC. This works under CDK, but under SST it says I do not have permssion:
    Copy code
    $ npx sst build 
    Preparing your SST app 
    Transpiling source 
    Synthesizing CDK 
    [Error at /dev-eco-server-build-job] You are not authorized to perform this operation.
    The code is:
    Copy code
    const ec2 = require("@aws-cdk/aws-ec2");
    export default class BuildJobStack extends sst.Stack {
      constructor(scope, id, props) {
        super(scope, id, props);
        const vpc = new ec2.Vpc(this, "eco-vpc", {
          maxAzs: 1
        });
    Note, this isn't even deploying it, just running
    build
    on command line. Any ideas?
    a
    f
    • 3
    • 10
  • l

    Loup Topalian

    03/08/2021, 11:55 AM
    I am trying to get a local start by "sst start"
    f
    • 2
    • 42
  • l

    Loup Topalian

    03/08/2021, 11:57 AM
    also, i was wondering : to get ssm var into my env, as we used that heavily in serverless, should I just : `process.env.COGNITO_CLIENT_ID = ssm.StringParameter.valueForStringParameter( this,
    ssm.eu-central-1:/${_app_.stage}/COGNITO_CLIENT_ID
    , );` ?
    f
    • 2
    • 7
  • l

    Loup Topalian

    03/08/2021, 11:59 AM
    and finally I was wondering : i think sst is building my lambda with esbuild. Is there a way to : bundle individually, declare externals ?
    f
    • 2
    • 28
  • s

    Seth Geoghegan

    03/09/2021, 5:51 PM
    I've come across an interesting behavior when using the
    customDomain
    setting on the API Construct
    f
    r
    • 3
    • 87
  • a

    Artem Kalantai

    03/10/2021, 9:55 AM
    but typescript saying TS2345: Argument of type '{ dynamodbTable: any; }' is not assignable to parameter of type 'TableProps'.<br/>Object literal may only specify known properties, and 'dynamodbTable' does not exist in type 'TableProps'.
    f
    • 2
    • 37
  • m

    Marcelo Olivas

    03/10/2021, 2:48 PM
    Need some help with creating a DQL for EvenBridge https://github.com/mfolivas/aws-node-eventbridge-serverless I tried it with serverless but I couldn't figure it out.
    f
    s
    • 3
    • 6
  • a

    Akos

    03/10/2021, 3:45 PM
    What's the easiest way to reuse the same lambda function while still using the Api construct? The use-case I have is that I have a single graphql lambda and the graphql spec should have POST, GET, and OPTIONS pointing to the same lambda. Also: we can't use ANY as we'd like OPTIONS to be unauthenticated (this is default browser behaviour we can't really change).
    s
    m
    f
    • 4
    • 13
  • l

    Loup Topalian

    03/11/2021, 6:51 PM
    cause I can't deploy anything on my company account with the default role
    f
    • 2
    • 4
12345...83Latest