r/awslambda • • Feb 05 '19

Lambda Idle Timeouts Before a Cold Start

3 Upvotes

An investigation of how long a Lambda can idle before a cold start. Benchmarks includes Lambdas from 128MB all the way up to 3008MB across multiple regions. Read more here.


r/awslambda • • Dec 21 '18

Using API Gateway WebSockets with the Serverless Framework

Thumbnail
serverless.com
3 Upvotes

r/awslambda • • Dec 13 '18

Monitoring and debugging AWS Lambda using Sentry and Epsagon (x-post /r/serverless)

Thumbnail
reddit.com
3 Upvotes

r/awslambda • • Dec 09 '18

Distributed Tracing in Serverless - Video Talk (x-post from /r/serverless)

Thumbnail
reddit.com
3 Upvotes

r/awslambda • • Dec 06 '18

How to Minimize AWS Lambda Cold Starts (x-post /r/serverless)

Thumbnail
reddit.com
3 Upvotes

r/awslambda • • Nov 26 '18

Don’t do Multipart Requests on AWS Lambda

Thumbnail
medium.com
3 Upvotes

r/awslambda • • Oct 26 '18

AWS Lambda Serverless Monitoring - Public Live Demo Environment • r/aws

Thumbnail
reddit.com
3 Upvotes

r/awslambda • • Sep 11 '18

How to Write 200 Lines of YAML for Lambda in 1 Minute

Thumbnail
stackery.io
3 Upvotes

r/awslambda • • Aug 20 '18

Hitchhiker's Guide to AWS Step Functions

Thumbnail
blog.epsagon.com
3 Upvotes

r/awslambda • • Aug 16 '18

What is AWS Lambda? | Introduction

Thumbnail
youtu.be
3 Upvotes

r/awslambda • • Jul 29 '18

A 3-Minute Hack For Building Local Native Extensions For AWS Lambda

Thumbnail
rookout.com
3 Upvotes

r/awslambda • • Jul 09 '18

How to control asynchronous invocations of your AWS Lambda functions

Thumbnail
medium.com
3 Upvotes

r/awslambda • • Jan 31 '18

AWS Lambda, GoLang and Grafana to perform sentiment analysis for your company / business

Thumbnail
made2591.github.io
3 Upvotes

r/awslambda • • Jan 26 '18

Open-source tool for enumerating Lambda functions across all regions with useful metadata

Thumbnail
github.com
3 Upvotes

r/awslambda • • May 24 '24

How to Use Docker to Install Pip Packages in AWS Lambda

2 Upvotes

https://www.youtube.com/watch?v=yXqaOS9lMr8

Hello all,

If you're working with AWS Lambda for Python projects, you've likely encountered the challenge of installing pip packages. Fortunately, Docker offers a robust solution for this issue. By leveraging Docker, you can streamline your deployment process and ensure that all necessary dependencies are correctly packaged. In this guide, I'll walk you through the entire process, from installing the necessary tools and setting up a Dockerfile to deploying your project to Amazon ECR. I link the tutorial here so you can watch it yourself :)

If you enjoy full stack or IoT-based content, would love if you could subscribe to the channel!


r/awslambda • • Mar 20 '24

Need to send email from lambda

2 Upvotes

I have one lambda script in python which will retrieve the same online and connection lost report which are stored in a list variable. I want to send those reports in mail with the headers instance id, region, status. I don't want to attach that list in the mail. I want as the table format like html. Please anyone help me to achieve this. Thank you!!


r/awslambda • • Mar 03 '24

How do I pass data from frontend to the Lambda function?

2 Upvotes

Hey folks, I have a Next.js app, where users select a PDF file and click on “Upload”. Then the PDF file gets saved to an S3 bucket. This triggers a Lambda function, which does the necessary processing.

I also need to pass some data (available at the frontend) to the Lambda function. (Currently I have hard-coded this data in the Lambda function). What options do I have?

Note that I don’t want to use function URL because the processing of the PDF file is a time-consuming task, and I don’t want the user to wait on the page for the result. Currently, once the PDF file is uploaded, I just show a message to the user saying that the processing has started.


r/awslambda • • Feb 29 '24

how to see logs from various AWS components in one view. My app consists of a storagegateway, s3, couple of lambda's dynamodb, ses etc. when the flow is triggered I dont want to check multiple screeens for log from each component. can I group all this in one place/screen

2 Upvotes

r/awslambda • • Jan 22 '24

Serverless GraphQL Federation Router for AWS Lambda

Thumbnail
wundergraph.com
2 Upvotes

r/awslambda • • Jan 18 '24

Serverless framework integration testing with vitest(or jest)

2 Upvotes

I am using the serverless framework for my API. It has couple of lambdas bound to API Gateway. I am also using neon serverless postgres database. The API is working fine but I want to have some integration testing in place. For the database layer I am using neon's branching feature (pretty irrelevant to the question) but in a nutshell I use a real cloud database for my tests. However the way I test the API is simply by importing the handlers inside test files and calling them by providing by hand the same parameters as an API gateway call would provide, meaning body, headers etc...

For example (pseudocode):

import { login } from "../../../test/userLogin";
import { handler } from "../getAll";

test("should execute", async () => {
  const jwt = await login();

 const result =  await handler({
    headers: {
      Authorization: `Bearer ${jwt}`
    },
    body: JSON.stringify({
      ...
    }),
    routeKey: "",
    rawPath: "",
    rawQueryString: "",
    isBase64Encoded: true,
    version: "",
    requestContext: {
      // ...
    }
  })

  expect(result).toEqual(...)
});

So my question is: Is that a best practice when testing a lambda with api gateway? What bothers me is that with the above way I am just testing the handler and not the whole endpoint as it would be in a real life scenario, even though the expected event is of type APIGatewayProxyEventV2 otherways the typescript compiler shows an error.

One other approach is to use serverless-offline and make requests inside my tests using supertest or axios, but that way the api would run in another process which means I could not mock anything and is also harder to setup.

Another approach is to call directly deployed lambdas which has the above issue but I also wonder how it would fit in a pipeline? I should deploy first in a temp stage then run tests and then remove the temp stage? That would cost quite some time to the pipeline as well as money if we have frequent deployments.

Ideally I would like something express-like

test("should execute", async () => {
  const token = await login();

  const response = await request(app)
    .get("/budgets")
    .set("Authorization", `Bearer ${token}`)
    .send();

  expect(response.status).toEqual(200);
});

where you provide the app and make request directly in the test suite's process.


r/awslambda • • Jan 11 '24

Need Help Installing Neo4j Package in AWS Lambda for Project

2 Upvotes

Hi everyone,

I'm currently working on a project that will be hosted on AWS Lambda, and I need to connect to a Neo4j database to fetch some information. I've been trying to install the Neo4j package in Lambda by creating a virtual environment, zipping it, and adding it as a layer, but it doesn't seem to be working.

Could someone please guide me through the steps, providing a detailed, step-by-step process to properly install the Neo4j package in AWS Lambda? I specifically need to initialize the session successfully and fetch the necessary data from the Neo4j database.

Any help or advice would be greatly appreciated! Thank you in advance.


r/awslambda • • Nov 22 '23

Help with mTLS

2 Upvotes

Hey guys!

I am a bit lost here. I am using a basic lambda function to connect my HA Server at home with Alexa. For security reasons I would love to add mTLS. I know that best practice would probably be to store the certificates in the ParameterStorage properly encrypted, however I am not that worried. Is is possible to just throw the .pem files in the lambda function itself somehow?


r/awslambda • • Nov 06 '23

How to host API Endpoints with JSON String Payloads on AWS SageMaker?

2 Upvotes

Despite the robust capabilities of AWS SageMaker, it currently lacks support for hosting API endpoints that accept JSON data with string values directly. The native endpoints, such as those for PyTorch and SKLearn, require inputs to be in numerical tensor formats. Although alternatives like text/csv are permitted, the use of application/json as an input format, specifically for strings, is not accommodated. This limitation poses a significant challenge for use cases that aim to host APIs rather than models on SageMaker, where the objective is to pass hyperparameters and invoke API calls without the need for preprocessing input data into tensors.


r/awslambda • • Sep 02 '23

Integration Testing Lambdas

2 Upvotes

Hi, first time working with AWS and with Lambda, before this have been working for 5-6 years with normal container solutions such as docker/kubernetes. At my current job we have started implementing lambdas and we are looking for a automation integration testing strategy for them. Some of these lambdas are sitting behind API gateways (Lambdas are written in Java, the infra is Terraform). What is considered best practices to automate this? Do people go for a mixed approach, invoking the lambdas with an AWS Client and Testing the gateway aswell or is 1 of the 2 usually chosen?