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

    Aram

    09/21/2021, 8:08 PM
    hey guys, what is the proper way of adding a DLQ to an SQS queue in sst 0.43.3? I was using
    cdk.Queue
    to set the
    deadLetterQueue
    on it to
    mySSTQueue.sqsQueue
    but since I updating sst from 0.37.2 to 0.43.3 a lot of new typescript errors started to appear during the build
    t
    • 2
    • 5
  • t

    Theo Ferreira

    09/22/2021, 4:52 AM
    Hey Everyone. (My first time posting here) I have a lambda on an EventBus that has to in turn invoke another lambda, but it seems like I have some kinda of permissions issue, as the second lambda never gets invoked. (Also no errors or logs in CloudWatch) If anyone has come across this issue before and have some links that I can read into to resolve the issue that would really be great. PS: Invoking the secondary lambda from a lambda attached to API Gateway works 100%
    f
    • 2
    • 17
  • s

    Sam Hulick

    09/22/2021, 4:27 PM
    has anyone been seeing random 401 errors with the HTTP API? it makes no sense to me. the previous requests are totally fine.. then boom, a random 401. and if I resend the exact same request, I get HTTP 200.
    f
    o
    • 3
    • 9
  • d

    Dan Van Brunt

    09/22/2021, 5:11 PM
    Api: Is not even sure if there is a way to redirect with HTTP APIs but I’m searching how to do this… and then the question might be, how to customize
    Integration Responses
    in SST’s
    Api
    .
    a
    j
    +2
    • 5
    • 23
  • a

    Alex Ketchum

    09/22/2021, 8:30 PM
    anyone know how to get serverless-bundle with webpack to not minimize code? It makes debugging difficult when you can not rely on the line number. I tried updating my webpack.config.js at the root of my directory to include the following but it did not help
    Copy code
    optimization: {
      minimize: false
    }
    d
    • 2
    • 8
  • d

    Dan Van Brunt

    09/22/2021, 9:27 PM
    Any way to do
    Api
    targets using aws-proxy ? so we can directly target services? SNS, EventBridge etc?
    t
    f
    • 3
    • 21
  • y

    Yousef

    09/23/2021, 2:39 AM
    Just migrated my NextJS project over from Amplify to Seed. Everything seems to work perfectly but I'm realizing that previews don't work. Previewing PRs works fine but the particular use case that I'm looking to support is previewing content changes using the NextJS advanced previews feature: https://nextjs.org/docs/advanced-features/preview-mode. Any thoughts? This seems like it would require reading the
    preview
    cookie and bypassing the CDN and regenerate the page @ edge.
    f
    • 2
    • 120
  • d

    Dan Van Brunt

    09/23/2021, 2:11 PM
    How does one add a Role to a function when using
    Api
    ? I see the permissions but I can’t seem to figure out how that can translate to something like this…
    t
    • 2
    • 36
  • g

    gio

    09/23/2021, 2:14 PM
    Should will show a link on the right of “AngularSite”? SST version 0.40.2
    f
    • 2
    • 2
  • s

    Slackbot

    09/23/2021, 2:14 PM
    This message was deleted.
    f
    • 2
    • 1
  • d

    Dan Van Brunt

    09/23/2021, 3:12 PM
    Anyone know of a great community resource for sounding board on Serverless infrastructure ideas? Like talking out approaches to what pattern would be best for a certain need?
    r
    • 2
    • 2
  • w

    Warwick Grigg

    09/23/2021, 5:44 PM
    Trying out the nextjs example in examples/nextjs-app/, for the prod deployment I'm getting a 503 error on clicking the "Click Me!" button. "LambdaExecutionError from cloudfront" and "The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions." It works fine with local frontend and the debug stack. I can't see anything wrong with the cloudfront distribution that's obvious to me. What could I do next to track down the problem please?
    f
    • 2
    • 11
  • s

    Sam Hulick

    09/23/2021, 7:47 PM
    is there any way to get a diff on a set of stacks that’s in debug mode? in other words: if I run
    yarn start --stage dev
    , it shows no changes in any stack or code. but if I quit that process and run
    yarn diff --stage dev
    , it shows all kinds of changes. is there a way to see exactly what’ll change when running
    yarn start --stage dev
    after making stack modifications?
    t
    • 2
    • 3
  • r

    Roger Chi

    09/23/2021, 8:16 PM
    Should I expect the environment variables defined within the NextjsSite construct to be available to my site during getServerSideProps within process.env? It doesn't seem like they are coming through (getting a
    Only absolute URLs...
    error in cloudwatch logs for the main site edge function) unless I also define a .env.local file within the frontend directory
    t
    f
    w
    • 4
    • 46
  • w

    Wael Zoaiter

    09/23/2021, 8:52 PM
    Hello all, I'm deploying my Next.js app via SST, and I'm proxying all requests to the API through Next.js server
    /api/graphql
    in
    pages/api/graphql.js
    I have Cognito auth middleware When I do
    sst start
    it works fine but when I do
    sst deploy
    I got
    503
    error Any idea why I'm getting this please
    f
    • 2
    • 16
  • m

    mathewgries

    09/23/2021, 10:21 PM
    Trying to make quick sense of the endpoints array in the API object here. The guide states “name” is the name of our API. I guess the array being named “endpoints” vs that explanation is what has me a little crossed. My app has three endpoints on the url. /users, /accounts/, and /transactions Would one entry cover that entire section of endpoints, since they are in the same API, or do I need to explicitly list each endpoint in it’s own object within the array?
    f
    • 2
    • 8
  • j

    Jon Holman

    09/24/2021, 2:51 PM
    Has anyone enhanced the editor in the sample notes application? I was thinking it would be cool to make it a rich text editor or something else.
    d
    • 2
    • 2
  • d

    Dan Van Brunt

    09/24/2021, 3:24 PM
    YIKES HELP? Anyone every experience constructs not autocompleting and erroring as (
    Property 'DeliveryStream' does not exist on type 'typeof...node_modules/@aws-cdk/aws-kinesisfirehose/lib/index
    ) and not appearing when editing.
    t
    f
    • 3
    • 30
  • d

    Dan Van Brunt

    09/24/2021, 5:33 PM
    What is the goal for keeping SST ’s CDK version up to date? @thdxr @Frank Not sure what their release schedule is like, but it seems pretty fast. its at 1.124.0
    t
    a
    f
    • 4
    • 22
  • r

    Roger Chi

    09/24/2021, 6:42 PM
    I opened a new issue with some more strange behavior I'm seeing. If a SSR page starts with the string "api", it seems to be getting excluded from the default-lambda server bundle, resulting in a 404 error once deployed. https://github.com/serverless-stack/serverless-stack/issues/855
    f
    • 2
    • 1
  • t

    Tony J

    09/24/2021, 11:30 PM
    Anyone by chance happen to know how to get the functionArn of a route in the api construct? It used to work by doing Object.keys(api_variable.functions) in version 0.30.0 but something seems to have changed with the api construct where now I can use api_variable.routes, but that just returns “GET /“. Which the documentation seems to allow me to use api_variable.getFunction(“GET /“), and I thought I was out of the woods but that returns a function object that when I try to grab the property it resolves to this opaque ${Token[TOKEN.1056]} that I can’t seem to turn into anything related to an actual functionArn that AWS will understand?
    t
    • 2
    • 13
  • s

    Sam Hulick

    09/25/2021, 9:18 PM
    when defining an
    sst.Api
    , is there any way to set the access log retention?
    f
    • 2
    • 1
  • j

    Josimar Zimermann

    09/26/2021, 1:23 AM
    Hello! I found this example showing how to use step functions: https://docs.serverless-stack.com/migrating-from-serverless-framework#serverless-step-functions But, what package should I require to use the
    sfn
    and
    tasks
    variable?
    r
    f
    j
    • 4
    • 11
  • d

    Devin

    09/26/2021, 6:50 PM
    When I run
    Copy code
    npx sst remove --stage prod
    I get ✅ across the board. When I run
    Copy code
    npx sst deploy --stage prod
    it tells me that my storage stack already exists. I’m not at all sure how to trouble shoot this. Right now I’m basically just comparing my ApiStack vs the notes app one. Any superior ideas?
    t
    f
    • 3
    • 21
  • s

    Sam Hulick

    09/27/2021, 1:31 AM
    there’s a bug in the latest SST. when I try to deploy, I get this:
    Copy code
    lambda/billing/libs/update-subscription.ts:80:25 - error TS2571: Object is of type 'unknown'.
    
    80   const cognitoUserId = response?.data?.updateSubscription?.user_id;
    VS Code shows no problem with this line. earlier versions of SST are also ok with it
    f
    t
    • 3
    • 41
  • b

    Branko Gvoka

    09/27/2021, 5:50 PM
    👋 How do I allow function to publish events via SNS for a specific topic arn? I’ve tried to create a Topic via
    fromTopicArn
    but cant figure out how to set the function/api to allow sns:Publish, I used to set default functio props to include in permissions [topic] 🙂 The error I get user with xxx cant publish to yyy topic Thanks!
    t
    • 2
    • 23
  • d

    Dan Van Brunt

    09/27/2021, 6:54 PM
    ❓ Opinions wanted: We’re building a serverless user activity notifications platform. We currently have the following setup:
    Webhook -> Lambda -> EventBridge -> Kinesis Stream -> Kinesis Firehose -> S3 Bucket
    It’s tracking a stream of user activity across a site and saving it to S3. It’s missing 1-2 pieces but I’m not 100% sure how to work with firehose data in S3. Essentially, each user “might” have an associated “owner” (we need to call out to check) and IF they do… we want to send that owner a daily digest of that user’s activity on the platform for proactive customer support. Which services would be good to tac on the remaining functionality of parsing s3 data to get that day’s digest and send it out to the owners?
    t
    f
    • 3
    • 10
  • s

    Sam Hulick

    09/27/2021, 11:04 PM
    I can’t tell if it’s SST or CDK doing it, but when I run
    DEBUG=rc:* yarn start
    to get debugging messages for my own stuff, I get a fair amount of other debugging messages, because they’re just checking for the existence of
    process.env.DEBUG
    . (to clarify, I’m using the npm
    debug
    package which lets you namespace your stuff to get selective debugging messages)
    f
    t
    y
    • 4
    • 7
  • s

    Sam Hulick

    09/28/2021, 2:28 AM
    I’m getting loads of errors now that I updated SST & CDK. I mean TONS. this is one that used to be totally fine:
    Copy code
    infra/api/stacks/routes/public.ts:73:9 - error TS2322: Type 'PolicyStatement' is not assignable to type 'Permission'.
    
     73         new iam.PolicyStatement({
                ~~~~~~~~~~~~~~~~~~~~~~~~~
     74           effect: iam.Effect.ALLOW,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ...
     81           resources: [props!.cognitoAuth.cognitoUserPool!.userPoolArn],
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     82         }),
    t
    • 2
    • 28
  • b

    Bshr Ramadan

    09/28/2021, 7:06 PM
    Hello there I want to create default cognito users in a userpool after it is created. is sst support that? and is it a good practice to do that in
    lib/Api.js
    ?
    f
    • 2
    • 10
1...192021...83Latest