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
18
votes
2 answers

Cannot find module 'source-map-support/register

I've followed the webpack4 example to setup the config: https://github.com/serverless-heaven/serverless-webpack/tree/master/examples/babel-webpack-4 as I got the error "cannot find module source-map-support/register". I've looked into the already…
16
votes
9 answers

Serverless command "offline" not found

I am running my nodejs code and also installed serverless(npm i -g serverless) but while running it with the command sls offline start --CacheInvalidations I am getting error as:- Serverless Error --------------------------------------- Serverless…
11
votes
1 answer

How to Debug AWS python lambdas using serverless offline through VS Code?

I'm trying to figure out a way to debug AWS python lambdas in VS Code using the serverless framework and serverless offline. I have gotten to the point where I can run the lambdas in VS Code, but I can't set breakpoints. I'm not sure if this is…
9
votes
3 answers

Node Debug serverless offline using vscode

I am using VS Code for development of AWS Lambda functions, I started using the serverless framework and the serverless offline library but, I am unable to use VS Code's debug mode to locally debug the code. I am referring many sites, Following is…
9
votes
0 answers

serverless-offline: remote Lambda custom authorizer for API Gateway

I have declared an HTTP Proxy method on my API Gateway resource using CloudFormation syntax (detailed in this earlier post.) I am trying to attach a custom authorizer, of type "Request", which uses an existing AWS Lambda function. The serverless…
8
votes
4 answers

Serverless Offline: handle multiple API gateways

You can easily debug your serverless application with the Serverless Framework and the Serverless Offline Plugin when you only have one, but how do you handle the case when you have multiple API Gateways/services? Should I run serverless offline for…
gr3g
  • 2,866
  • 5
  • 28
  • 52
7
votes
0 answers

How to get code coverage metrics from integration tests using serverless-offline and Supertest?

I'm building an AWS Lambda function and trying to write some integration tests for it. The Lambda function is running locally using serverless-offline plugin and simply receive a GET request with some query parameters. I'm using Jest and Supertest…
6
votes
3 answers

Serverless-offline throws "Configuration error" or "Cannot read property 'options' of undefined"

I am trying to deploy a serverless REST API with NodeJS, AWS Lambda, API Gateway, RDS and PostgreSQL. So far I've set up the PostgreSQL RDS successfully and before start writing the functions to handle the requests to the DB I thought it'd be a good…
andres_v
  • 399
  • 1
  • 4
  • 12
5
votes
4 answers

Serverless framework serverless-offline start error on get request cannot find module 'node:url' (Lambda AWS)

I have the following issue... turns out I cannot test locally my aws lambda function over serverless-offline plugin in serverless framework for nodejs. Cannot do a simple GET request. I am able to deploy to aws lambda with serverless deploy command,…
5
votes
2 answers

How to run a Lambda Docker with serverless offline

I would like to run serverless offline using a Lambda function that points to a Docker image. When I try to run serverless offline, I am just receiving: Offline [http for lambda] listening on http://localhost:3002 Function names exposed for local…
Carlos
  • 142
  • 2
  • 10
5
votes
1 answer

How to configure and use serverless offline in macOS?

I am trying to use the serverless-offline library, using the serverless framework, I have the serverless.yaml file properly configured, with the - plugins: - serverless-offline added to it. Following is my package.json - { "name":…
Dev1ce
  • 5,390
  • 17
  • 90
  • 150
5
votes
1 answer

How to use computer IP address when making request to lambda running offline?

Hi I am trying to access my lambda using my computer's local IP address but am repeatedly getting a Connection refused error. However if I use: http://127.0.0.1:3000/my-path the endpoint works fine. Would anyone have any suggestions for what might…
5
votes
1 answer

API Gateway HTTP Proxy integration with serverless-offline (NOT Lambda Proxy)

I am trying to use serverless-offline to develop / simulate my API Gateway locally. My API gateway makes liberal use of the HTTP proxy integrations. The production Resource looks like this: I have created a serverless-offline configuration based on…
4
votes
1 answer

serverless-offline-sqs : sls offline stuck on "offline: Starting Offline SQS: local/us-east-1." #171

sls offline command stuck on "offline: Starting Offline SQS: local/us-east-1." "serverless-offline": "^6.8.0", "serverless-offline-sqs": "4.0.0", // and the all newest serverless-offline-sqs: skipCacheInvalidation: false autoCreate:…
4
votes
1 answer

Mocking with Serverless Offline and Integration Tests

I have a Serverless stack (AWS) using API Gateway authentication and a Lambda, implementing a restful API using NestJS. I'm using Serverless-offline to simulate the stack in my local environment. This allows me to simulate the API Gateway…
1
2 3 4 5 6 7 8