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
4
votes
1 answer

Cant get path: /{proxy+} to work (serverless-offline)

Excuse me if im misunderstanding how this should work, im fairly new to the serverless world. I want to avoid having to explicity list all of my routes in my serverless.yml file so have used the catch all {proxy+}. When i run sls offline start i see…
Samuel
  • 2,485
  • 5
  • 30
  • 40
3
votes
1 answer

serverless offline start hot reload not working

I am unable to hot reload when using serverless offline start. Here is my serverless.yml file service: function-with-environment-variables frameworkVersion: ">=3.0.0 <4.0.0" provider: name: aws runtime: nodejs16.x plugins: -…
Mateen Kiani
  • 2,869
  • 2
  • 19
  • 29
3
votes
1 answer

AppSync Simulator: TypeError: Cannot convert undefined or null to object

(I am using machine translation.sorry) I'm building a local environment for appsync using a serverless framework Serverless-dynamodb-local Serverless-appsync-simulator Serverless-offline I got an error when I installed these and used the "sls…
3
votes
1 answer

Cannot access local server using localhost but works via IP

I'm viewing a locally hosted website (React ). I can view it via IP http://192.168.1.100:3000/ (192.168.1.100 is my local IP address), but not via http://localhost:3000/ or http://127.0.0.1:3000/ I can access my locally hosted content at…
Bob
  • 27
  • 5
3
votes
0 answers

serverless-offline cannot run both Node and Python runtimes simultaneously

When I run serverless offline with both Node and Python runtimes, I get the following error upon hitting a Python endpoint: Traceback (most recent call last): File…
lebolo
  • 2,120
  • 4
  • 29
  • 44
3
votes
2 answers

sls offline start, serverless Warning: found unsupported runtime 'nodejs8.10' for function

Whenever I tried to run the serverless framework offline by using sls offline I am getting this warning for every function.
3
votes
1 answer

Unable to invoke a lambda from another lambda using aws serverless offline

I want to invoke a lambda from another lambda inside serverless-offline .I want to make a serverless offline web application.But I am getting this error: { UnknownError: Unsupported Media Type at Object.extractError…
3
votes
0 answers

Serverless Offline <> React - Local Dev Page Load

I have a serverless application that is using the serverless-offline plugin and create-react-app to load a front-end client, but I'm not sure how I can configure my serverless app to load the index.html page and also the proper link format that I…
cphill
  • 5,596
  • 16
  • 89
  • 182
3
votes
1 answer

Serverless Offline: Error while running handler, cannot find module

I've been trying to use serverless-offline / serverless-offline-python and a family of other node packages (serverless-s3-local for example) to build an offline testing environment for some lambdas that I've written. Using serverless-offline-python,…
Chad Van De Hey
  • 2,716
  • 3
  • 29
  • 46
2
votes
2 answers

Got unexpected reserved word after installing serverless offline

I installed serverless-offline with the following command npm install serverless-offline --save-dev This is the version that was installed: "serverless-offline": "^10.0.0" and have added plugins at the bottom of my yaml file: plugins: -…
webber
  • 595
  • 3
  • 10
  • 20
2
votes
1 answer

Serverless Offline & DynamoDB throws Local UnknownEndpoint: Inaccessible host: localhost at port 8000 Service may not be available in localhost region

I'm playin around with Serverless and I have no luck getting serverless-offline to work with serverless-dynamodb-local. I have very minimal setup, it takes 3minutes to reproduce, I did it like this: Generate a TS Serverless project like - sls…
2
votes
0 answers

sls offline GET /users (λ: getUsers) ✖ ENOENT: no such file or directory, open '~/reponame.go'

While using serverless offline for Golang. On sending any request from Postman GET /users (λ: getUsers) ✖ ENOENT: no such file or directory, open '~/Desktop/Reponame.go' However the same works fine while using sls offline --useDocker
Swetank
  • 111
  • 2
  • 7
2
votes
1 answer

Is there a way to debug Serverless Framework Typescript functions deployed to AWS Lambda, without using serverless-offline?

What is the best way to debug Typescript Serverless framework functions deployed to AWS Lambda without using serverless-offline package? My project is quite reliant on other AWS services such as AWS Cognito, SNS, SQS etc, and other external services…
2
votes
1 answer

How to run "jest" after run "serverless offline" in github action?

I wrote a serverless API and some jest tests. Here is my source code: https://github.com/liou-jia-hao/serverless-typescript-no-webpack/tree/add-dev-skipauth I wrote a test which rely on local server running. Here are my test file: import axios, {…
2
votes
1 answer

Akka config not being found with sbt assembly + serverless

I am trying to build an app for serverless using sbt assembly. It works if I compile it using sbt assembly and then run it using serverless invoke local --function func, however if I run it using serverless offline start it will throw an error…