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

Failure: ValidationException: 1 validation error detected: Value '[object Object]' at 'tableName' failed to satisfy constraint

When I am trying to hit createAuction URL, I am getting this error, while running serverless offline Please let me know what to do in order to rid of this error! Serverless YAML file: service: AuctionService plugins: - serverless-bundle -…
Abhishek Gautam
  • 1,617
  • 3
  • 18
  • 29
2
votes
1 answer

permission needed to install serverless via npm

I am trying to install serverless via npm (npm install -g serverless) but get the following error: npm ERR! code EACCES npm ERR! syscall rename npm ERR! path /usr/local/lib/node_modules/serverless npm ERR! dest…
Sabo Boz
  • 1,683
  • 4
  • 13
  • 29
2
votes
1 answer

My .zip file size is 45mb but it's showing the error of large file size on AWS layer

I am using the serverless framework for the deployment. It's throwing the following error while we are deploying it on the AWS. But my zip file size is 45mb and unzipped size is 130mb on local. Serverless Error…
2
votes
0 answers

How do I connect to a local SSM built on serverless-offline-ssm using aws-sdk?

Here's a snippet of my serverless.yml with relevant configurations: plugins: - serverless-offline - serverless-offline-ssm custom: serverless-offline: httpPort: 3031 host: 0.0.0.0 serverless-offline-ssm: stages: - dev …
James Li
  • 133
  • 10
2
votes
1 answer

Debugging servlerless offline function with VSCode - source map issue?

I have created a simple mail function for AWS Lambda using serverless. For development, I am using serverless-offline to replicate the functionality of Lambda and using VSCode as my IDE. I am also using serverless-webpack to generate my resultant…
2
votes
2 answers

A valid SSM parameter to satisfy the declaration 'ssm:MY_ENV_VAR' not found

I am running Serverless Offline and have configured environment variables based on stages. provider: name: aws stage: ${opt:stage,'dev'} environment: MY_ENV_VAR: ${self:custom.myEnvVar.${self:provider.stage}} custom: stages: -…
Raheel
  • 8,716
  • 9
  • 60
  • 102
2
votes
1 answer

"Unsupported Media Type" using serverless offline

I'm working on a small serverless offline assignment and I got error Unsupported Media Type when tried to invoke one lambda function in another. I found a solution but when I tried to applied to my project was not working: here in the link all…
Bablo
  • 59
  • 7
2
votes
0 answers

How to run serverless offline in my node project?

I am a long time user of serverless, but only started using this offline plugin on my current project. The current project is a Node GQL server using Apollo and TypeORM that will eventually be deployed to AWS Lambda, but is only local for now while…
2
votes
1 answer

error: "Serverless-offline: route not found." when trying to run Angular 9 Universal with serverless-offline

My Angular 9 Universal app is running smoothly locally. But I can't run it with serverless-offline. I am getting this error: { currentRoute: "get - /", error: "Serverless-offline: route not found.", existingRoutes: [ "* - /production", "* -…
2
votes
0 answers

Serverless-offline works fine with javascript but throw error in python

I am new to serverless framework , I am trying to use serverless-offline , my code works fine when I deploy it on AWS but locally is throw error of no module found. the same code when written is javasript for hello-world it works just fine this is…
2
votes
0 answers

Configuring debugging in VSCode for webpacked Serverless Node.js application on Windows 10

Context & Goal Recently I joined a team that is developing a serverless Node.js webpack application with VSCode. My goal is to be able to run the application so that breakpoints are hit within Visual Studio Code. Context Judging from several…
2
votes
0 answers

Invoke Lambda function without authorization on local serverless-offline environment

I am trying to test authorization of a Lambda function using Cognito, Serverless framework & Serverless-Offline plugin. When I run my stack locally using serverless offline, all requests by default are authorized and I can execute them without a…
shenku
  • 11,969
  • 12
  • 64
  • 118
1
vote
4 answers

detect is localhost AWS Serverless framework

i'm running my serverless with serverless offline library, i'm running using sls offline and i have several. how i detect is my lambda API triggered from localhost or server? thank you i already try like process.env.IS_LOCAL,…
1
vote
0 answers

Serverless-offline Lambda timeout 504

I am serving local NestJS backend using serverless-offline plugin. Sometimes it serves and runs without any issues but sometimes I receive "× [504] - Lambda timeout" error in terminal after any request I make. Doesn't matter if it's GET or POST etc.…
hawran
  • 131
  • 3
  • 11
1
vote
0 answers

Serverless offline don't work with cookies

I am in trouble with the serverless-offline plugin: When my serverless is deployed to aws cookies works fine, But it's doesn't work on localhost with plugin. I saw somewhere than it's will perhaps be possible to make it works with a custom velocity…