115 questions
1
vote
0
answers
135
views
CredentialsProviderError using ApiGatewayManagementApiClient in Serverless Framework Offline
I'm having issues trying to get Serverless Framework (using the Offline plugin) to be able to use the ApiGatewayManagementApiClient to send WebSocket responses offline.
It's probably just using the ...
0
votes
0
answers
51
views
Serverless Offline with EventBridge Scheduler Error: The execution role you provide must allow AWS EventBridge Scheduler to assume the role
As the title says, I'm encountering this error when running in SLS Offline. I just want to confirm if EventBridge Scheduler really isn't supported by SLS Offline?
resources.ts
export const resources = ...
-1
votes
1
answer
474
views
Serverless v4 with offline : typescript handlers are not build
I have a problem migrationg my big app in serverless v3 to v4. I'm using typescript and I develop in local using serverless-offline.
But after change all configurations introduced by v4 and run sls ...
1
vote
0
answers
97
views
Serverless offline not logging to console with golang
When using serverless offline, logs aren't logged to console instead returned as an HTTP response when triggered as an endpoint
serverless.yml
service: go-sls # Define your service name
provider:
...
1
vote
1
answer
147
views
Serverless Offline is using the environment variables from actual AWS SSM instead of local .env file
I have a Nest JS Lambda backend and I am using serverless-offline module to run it locally and connect to my local Postgres database.
My serverless.yml file looks like
service: wbx-borrower-onboarding-...
0
votes
0
answers
48
views
is there any other way to upload image file in local path location using python lambda function without using flask without getting encoding errors?
---
import re
def extract_file_content(event):
if isinstance(event['body'], str):
try:
file_content = event['body'].encode('utf-8', errors='ignore')
except ...
0
votes
1
answer
588
views
Serverless offline failing to start with serverless-offline-sns
I am getting this error trying to run serverless offline:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/mypc/Downloads/textai/src/functions/processExpenseAnalysisJob.js' imported from /home/...
0
votes
1
answer
357
views
AWS lambda invocation locally
I have SQS -> triggers a lambda(code that needs to be tested) -> where its workflow -> can trigger other lambdas in multiple API Gateways (already deployed in AWS)
Is there a way I can ...
-1
votes
1
answer
474
views
Serverless Offline: Route Not Found" Error Despite Correct Configuration
Hello Stack Overflow community,
I'm facing an issue with the Serverless Framework and the serverless-offline plugin where I'm getting a "route not found" error despite having the correct ...
2
votes
1
answer
17k
views
Serverless Offline - Attempt to invoke function 'xxx' failed. Function does not exists
Hello :) Hope to find you well.
I am trying to set test my serverless environment locally via the serverless-offline node package.
Here is my serverless.yml file:
org: etisreal11
app: leaderboards-api
...
1
vote
1
answer
813
views
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 ...
1
vote
4
answers
390
views
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 ...
1
vote
1
answer
729
views
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-...
7
votes
0
answers
2k
views
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 ...
1
vote
1
answer
1k
views
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 ...
-1
votes
1
answer
848
views
Does Serverless-Offline allow you to locally test lambdas that interact with AWS services that are only accessible from the same VPC?
I have an RDS db and an RDS Proxy handling my connections to it. RDS Proxy is only accessible from within the same VPC. I want to be able to locally test a Lambda I've written to connect to it. If I ...
1
vote
0
answers
253
views
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 ...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
727
views
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 &...
1
vote
1
answer
2k
views
Load environment variables when running locally via serverless offline
I want to load env variables from .env file, when running locally,
So here's my serverless.yaml file,
functions:
health:
handler: src/api/health.check
name: ${self:provider.stackName}-health
...
1
vote
2
answers
599
views
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 ...
0
votes
1
answer
201
views
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 { ...
7
votes
1
answer
10k
views
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:...
0
votes
1
answer
1k
views
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:...
0
votes
1
answer
517
views
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 {
...
5
votes
4
answers
6k
views
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 ...
1
vote
4
answers
6k
views
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 ...
6
votes
1
answer
3k
views
How to invoke a lambda function from another lambda in serverless offline?
I'm trying to invoke a lambda function within the lambda function using Serverless framework. I'm using this code right now and it works fine when deployed to AWS. But it returns some errors locally ...
2
votes
2
answers
2k
views
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 ...
1
vote
1
answer
622
views
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'...
3
votes
1
answer
2k
views
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 ...
1
vote
1
answer
981
views
Problem with connection acquisition when using knex and serverless-offline
Setup
I'm building a serverless application that uses a website frontend. The website sends queries to the API, which connects to the database. The infrastructure is hosted on the AWS, but the problem ...
2
votes
0
answers
175
views
Cannot delete dynamodb records and no error message
I using a serverless-offline to run AWS-lambda locally on my Mac book. Then I fetch the endpoint to remove 1 user's data. Here is the code:
export const deleteItem = async <T extends BasePersistent&...
1
vote
1
answer
2k
views
How to invoke lambda with Cognito event/trigger in serverless-offline for local test
I'm trying to write a trio of Cognito AuthChallenge lambdas for custom auth flow. I wanted to use serverless-offline to develop and test the lambdas locally with nodejs (also in jest tests in cicd ...
1
vote
0
answers
441
views
Serverless create dynamodb table locally only
I am writing a serverless application. It uses an already created dynamodb table and hence configured properly in serverless.yml file. Now, I want to run mock test locally using serverless-offline and ...
3
votes
1
answer
4k
views
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:
...
1
vote
0
answers
812
views
Problem with layer when using serverless-offline with Bref
I'm trying to run a Symfony application with Bref and serverless-offline. I know that Bref doesn't officially support serverless-offline, but I want to give it a shot; this thread - https://github.com/...
2
votes
0
answers
775
views
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 ...
7
votes
1
answer
1k
views
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 ...
2
votes
1
answer
3k
views
AWS SAM Local vs Serverless-offline
We are a Terraform shop for standing up our infrastructure on AWS and I am using AWS SAM Local to:
Test AWS Lambdas locally without having to deploy on the cloud.
I can also run integration tests on ...
2
votes
1
answer
1k
views
Serverless offline complains about missing stack before the first deployment
I am trying to run locally a serverless application, but it is throwing this error:
Stack with id <my_stack_id> does not exist
I didn't deploy the stack yet, just trying to run it locally. It ...
7
votes
2
answers
5k
views
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://...
2
votes
1
answer
299
views
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 ...
2
votes
1
answer
880
views
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 ...
2
votes
1
answer
89
views
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 ...
1
vote
0
answers
282
views
Trigger golang lambda func in docker from SQS event
I'm unable to start a SQS event lambda consumer on event when the serverless is launched offline with useDocker option. If I don't run the functions in docker containers that handler is triggered ...
-1
votes
2
answers
1k
views
How to run multiple microservices configured on same custom domain, locally?
I have configured my backend following this article:
How to deploy multiple micro-services under one API domain with Serverless
I understand that deploying the services one by one is possible using ...
0
votes
1
answer
1k
views
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 ...
1
vote
1
answer
1k
views
Accessing environment configs defined in serverless.yaml in standalone nodejs script
I have recently started working on a project in which we are using serverless framework. We are using docker to make dev environment easier to setup.
As part of this docker setup we have created a ...
2
votes
0
answers
5k
views
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: ...