Questions tagged [serverless-offline]

Serverless Offline plugin for the Serverless Framework – Emulates AWS Lambda and API Gateway locally when developing your Serverless project

Serverless Offline plugin emulates AWS λ and API Gateway on your local machine to speed up your development cycles. To do so, it starts an HTTP server that handles the request's lifecycle like APIG does and invokes your handlers.

112 questions
1
vote
1 answer

Load environment variables when running locally via serverless offline

I want to load env variables from .env file, when running locally, So here's my serverless.yaml file, functions: health: handler: src/api/health.check name: ${self:provider.stackName}-health environment: USER_POOL_APP_CLIENT_ID:…
1
vote
1 answer

How to invoke a lambda function from another lambda in serverless offline?

I'm trying to invoke a lambda function within the lambda function using Serverless framework. I'm using this code right now and it works fine when deployed to AWS. But it returns some errors locally in serverless-offline. Code I'm using right…
1
vote
1 answer

Problem with connection acquisition when using knex and serverless-offline

Setup I'm building a serverless application that uses a website frontend. The website sends queries to the API, which connects to the database. The infrastructure is hosted on the AWS, but the problem I have ran into only affected the local…
1
vote
0 answers

Cannot delete dynamodb records and no error message

I using a serverless-offline to run AWS-lambda locally on my Mac book. Then I fetch the endpoint to remove 1 user's data. Here is the code: export const deleteItem = async (item: T) => { const params:…
1
vote
1 answer

How to invoke lambda with Cognito event/trigger in serverless-offline for local test

I'm trying to write a trio of Cognito AuthChallenge lambdas for custom auth flow. I wanted to use serverless-offline to develop and test the lambdas locally with nodejs (also in jest tests in cicd pipeline). For example, here is a simplified handler…
1
vote
0 answers

Serverless create dynamodb table locally only

I am writing a serverless application. It uses an already created dynamodb table and hence configured properly in serverless.yml file. Now, I want to run mock test locally using serverless-offline and serverless-dynamodb-local plugin. The problem is…
1
vote
0 answers

Problem with layer when using serverless-offline with Bref

I'm trying to run a Symfony application with Bref and serverless-offline. I know that Bref doesn't officially support serverless-offline, but I want to give it a shot; this thread - https://github.com/brefphp/bref/issues/875 - implies that it should…
umulmrum
  • 153
  • 1
  • 8
1
vote
1 answer

AWS SAM Local vs Serverless-offline

We are a Terraform shop for standing up our infrastructure on AWS and I am using AWS SAM Local to: Test AWS Lambdas locally without having to deploy on the cloud. I can also run integration tests on locally running lambda function as it will call…
1
vote
1 answer

Serverless offline complains about missing stack before the first deployment

I am trying to run locally a serverless application, but it is throwing this error: Stack with id does not exist I didn't deploy the stack yet, just trying to run it locally. It is possible that the offline serverless plugin only…
1
vote
0 answers

Trigger golang lambda func in docker from SQS event

I'm unable to start a SQS event lambda consumer on event when the serverless is launched offline with useDocker option. If I don't run the functions in docker containers that handler is triggered successfully. I'm using the example from here (I'm…
Ivaylo Ivanov
  • 4,333
  • 2
  • 12
  • 16
1
vote
1 answer

Accessing environment configs defined in serverless.yaml in standalone nodejs script

I have recently started working on a project in which we are using serverless framework. We are using docker to make dev environment easier to setup. As part of this docker setup we have created a script that creates S3 buckets & tables among other…
1
vote
1 answer

Possible EventEmitter memory leak detected NodeJS - Lambda

I am attaching a graphql server to a aws lambda and I getting this warning executing serverless-offline: (node:16890) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use…
1
vote
1 answer

I want to degrade the serverless version from 2.41.2 to 2.35.0

By mistake I had installed the higher version of serverless on my pc. Now I want to degrade my serverless framework version from v2.41.2 to v2.35.0 due to some project requirements. What I had tried to do: I uninstalled the current serverless…
1
vote
1 answer

AWS SQS SendMessage isn't working with serverless-offline-sqs

I'm working with serverless, porting two functions, one (call it generator) that is currently a long-running node process and the other (call it checker) triggered by cron, so that they both would be lambdas, checker triggered by a schedule, and…
1
vote
0 answers

Converting Nestjs with graphql prisma to serverless, error starting up

I am having some trouble with converting Nestjs to serverless. My tech stack is, Nestjs, Graphql and Prisma. I have followed multiple guide buy to no avail, below are the tutorials I have…
Ivan Simm
  • 43
  • 4
  • 9