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

I sent a server request to serverless nestjs, but no response

I am studying serverless nestjs. I am trying to run serverless offline using the serverless-offline plugin. I've succeeded in running serverless offline, but when I send a server request it doesn't respond. The serverless message looks like…
0
votes
1 answer

Url Image from S3 not displaying the image

I am trying to upload an image to S3 through graphql using the apollo-upload-client library which just give the ability to send images through a graphql query. So the image is storying itself in the S3 bucket, but when I try to read the Location url…
0
votes
1 answer

Is it possible to trigger lambda by changing the file of local s3 manually in serverless framework?

I used the serverless-s3-local to trigger aws lambda locally with serverless framework. Now it worked when I created or updated a file by function in local s3 folder, but when I added a file or changed the context of the file in local s3 folder…
0
votes
1 answer

Serverless Offline: The "path" argument must be of type string. Received undefined

Not sure why this started happening but I have a very simple serverless app that was working, but now when I run sls offline start I get the error above. I have found the culprit and it is the events inside the functions. Here is the serverless.yml…
Taylor Austin
  • 5,407
  • 15
  • 58
  • 103
0
votes
0 answers

Express router GET endpoint gives Not Found error

This is my app.js app.use('/v1/abc/', router); Then secondary level router.use('/:primary_id/def',defServices); Final service level class defServices { constructor() { const router = new express.Router({ mergeParams: true }); …
0
votes
1 answer

Serverless offline + DynamoDb local issue

I've been playing with serverless offline and dynamodb local lately. When I've used websockets - things worked well. Then, I've decided to change protocol to http. Don't know how this can be related, but it's the only change I've did in the…
0
votes
1 answer

Using the Serverless Framework with AWS, Sequelize's auto-generated table aliases differ depending on environment (offline vs. Lambda)

I'm using the Serverless Framework with the serverless-offline plugin. I've been developing an AWS Lambda function offline and so far haven't had many huge problems. I need to do a more complicated SQL query, and so I opted to use the literal method…
0
votes
1 answer

Is it possible to test lambda limits with serverless-offline?

I would like to test aws lambda limits locally with serverless-offline. When I ran this code I expected to see an error (TooManyRequestsException) but all request are sent successfully. Am I missing something, or is it not possible to test aws…
0
votes
1 answer

Attempting to use apollo-server's playground results in Unexpected end of JSON input

I'm getting this error when I launch the playground in my apolly-server-lambda application: Playground.tsx:289 SyntaxError: Unexpected end of JSON input at JSON.parse () at index.js:40 The app has only one test resolver. I use…
Edy Bourne
  • 5,679
  • 13
  • 53
  • 101
0
votes
1 answer

Serverless offline and DynamoDB local on docker

I want to train on Serverless with a DynamoDB local docker. However, with this code I get an empty list of tables : import { DynamoDB, Endpoint } from "aws-sdk"; export const handler = async (event, context, cb) => { const ddb = new…
0
votes
1 answer

putObject upload broken files on S3 only when its by API

I have a problem when i try to upload a file on S3 through my API I use the "putObject" method, and the thing that surprise me it's it work when i run my serverless application locally, with serverless-offline, i can push the all file on s3 and i…
dc-mpo
  • 353
  • 1
  • 2
  • 10
0
votes
1 answer

Serverless offline CUSTOM: using external file AND internally added variables?

I am having a weird problem where I need to use Serverless "custom:" variables read both from an external file and internally from the serverless.yml file. Something like this: custom: ${file(../config.yml)} dynamodb: stages: …
0
votes
0 answers

offline: Authorization response did not include a principalId: (λ: authorize) in aws lambda using node serverless offline

I am new to node and AWS lambda, I want to run all API endpoints locally so I am hitting a protected route with all valid credentials, but still getting this error. offline: Authorization response did not include a principalId: (λ: authorize) , any…
0
votes
1 answer

Serverless Excel export in nodejs

I need a simple help about how to generate Excel and then export it on click of API url in serverless offline.It should show a download option for that file. When I am creating a file in normal node with express frework.It is generating correct…
0
votes
1 answer

serverless offline won't run offline: Failed to load resource: net::ERR_CONNECTION_REFUSED

PROBLEM I cannot get serverless offline to run when not connected to internet. serverless.yml service: my-app plugins: - serverless-offline # run on port 4000, because client runs on 3000 custom: serverless-offline: port: 4000 # app and…
Wronski
  • 1,506
  • 3
  • 18
  • 37