An unofficial, read-only Hacker News reader. Join the beta →

Serving Qwen via AWS Lambdas for fun and 80x negative profit (opens external site)

137 points by octember 3 days ago | noahbuilt.it | 20 comments on HN

View full thread · View on Hacker News

Comment thread (3)

  1. Keep in mind that AWS Lambda has different performance characteristics based on how much memory you provide it.

    1. For example a 10GB instance may have access to 6-ish cores. Also lambda instances under 1.3GB tend to have slower cores. [1].

    2. There's the new aws managed lambda instances that can allow 32GB and 16vCPU instances [2]

    3. Larger lambdas tend to have more network bandwidth so may be downloading layers from S3 might be faster [3]

    Do you think it would make sense to stuff two or more layers into a larger lambda instances given that there's multiple cores and more memory available? I wouldn't be surprised if some optimizations would lead to only 20x negative profit :)

    [1] https://aws.amazon.com/blogs/compute/optimizing-compute-inte...

    [2] https://aws.amazon.com/about-aws/whats-new/2026/03/lambda-32...

    [3] https://aws.amazon.com/blogs/compute/improving-lambda-functi...

    Replies (2)
    1. Also ensure you're using the Graviton (arm64) lambdas.
    2. Yeah I did some optimizations I removed from the blog post, I did get it ~3x cheaper/faster doing some hill climbing. But the gap is pretty wide. feels like the best lever is GPU backed instances which im now testing