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

Local Development of Lambda Functions

I have a certain number of APIs which are being migrated to AWS. These APIs are based on Nest.js and for local development, I simply run the application which bootstraps a web server and I can invoke certain end points using swagger or Postman at…
0
votes
1 answer

How to pass custom cli commands to serverless-offline?

I am migrating a serverless application to it's most recent versions. This is the starting point: "devDependencies": { "serverless": "^2.43.1", "serverless-offline": "^7.0.0", "serverless-plugin-warmup": "^5.2.3", …
Marco
  • 22,856
  • 9
  • 75
  • 124
0
votes
1 answer

Cannot use import statement outside a module in serverless node application

I'm currently converting a serverless AWS lambda microservices API over to typescript. I'm hoping I can maintain the existing js files while adding more ts files as we move on. I'm having some trouble configuring webpack and typescript and getting…
0
votes
0 answers

Add environmental variables to serverless framework

I'm trying to add environmental variables using serverless-offline plugin and Turbo repo with: ... custom: config: ${file(./config/${sls:stage}.yml)} This is working when I deploy it, but it doesn't when I run yarn turbo run dev script. I tried…
0
votes
1 answer

Not able to connect to my local graphql server with apollo studio sandbox

I am running a graphql server using serverless offline and trying to connect to the server with Aollo Studio. The weirdest bug is that it was connecting properly a week back and now the exact same server is not connecting. The same thing I have…
0
votes
0 answers

Error: Detected unrecognized CLI options: "--host"

Good morning. I am trying to start a new project in my Docker container with framework without server and offline without server. After installing everything, I issue the command. sls --stage development offline start --host 0.0.0.0 And I get the…
0
votes
0 answers

Serverless offline reload not working version 12

Found some solutions where it was mentioned that by adding --reloadHandler it should work however i am getting below message when tried the command : serverless offline start --reloadHandler Running "serverless" from node_modules Initializing…
0
votes
1 answer

Nodejs Serverless API is Corrupting PDF

I have a Nodejs API that returns a PDF file in the response. It returns the PDF as binary data. On my frontend, I use a package called React-PDF which takes the PDF endpoint url and fetches the data to display. This worked completely fine up until…
dividebyzero
  • 111
  • 9
0
votes
1 answer

React app cannot receive cookies from aws lambda backend

I'm developing a server with AWS Lambda on Serverless Framework, and using serverless-offline to test locally. I just want to send cookies to my react app. backend code. import { APIGatewayProxyHandlerV2 } from "aws-lambda"; const oneDayMillis = 1…
hardyeats
  • 15
  • 1
  • 4
0
votes
1 answer

Avoid using Docker with Serverless Offline and Golang

Currently, every time I need to use serverless offline, I have to set my function handler in serverless.yml to the main.go of the function as such: hello: handler: src/hello/main.go memorySize: 128 timeout: 5 events: -…
0
votes
0 answers

TypeError: Cannot read property 'Subscriptions' of null (AWS, Lambda, serverless-offline)

Trying to build an api out for my AWS lambda and when I try and run serverless-offline so I can test and see if my api is working I get this error: 'TypeError: Cannot read property 'Subscriptions' of null'. this is my yaml file: service:…
0
votes
1 answer

serverless-offline custom plugin define env variables

I want to boot a memory mongodb for my local development with serverless This is the plugin I did const { MongoMemoryServer } = require('mongodb-memory-server') class MongoMemoryServerPlugin { constructor(){ this.mongod …
Ajouve
  • 9,735
  • 26
  • 90
  • 137
0
votes
4 answers

Serverless - offline plugin

I have a project in Node16 where I am trying to use Serverless-offline plugin. But I do not know how to make it work. This is how I set up the plugin in the serverless.yml file: And these are the ways I tried to run to install the plugin: npm…
0
votes
1 answer

Debug Amazon Serverless Offline with Pycharm

I use pycharm and wanted to know if there is a way to debug Amazon Serverless Offline with it. I found this guide, but though it gives some knowledge on how to interactively debug using an IDE it didn't help me. It also provides a detailed guide on…
0
votes
0 answers

Command 'offline start' not found even though plugins are installed

I was trying to run a node.js project with serverless installed globally but I keep running into this error where it doesn't recognise the command. Command: sls offline start --stage dev --app serverless --port 4000 --basepath…
Lazlo
  • 159
  • 1
  • 7