Comments (6)
@comtom can you send the whole (redacted) serverless config?
The part of config you sent imply there would be some
resources:
Resources:
QueueName:
Type: AWS::SQS::Queue
Properties:
QueueName: your-queue-name
Is that the case?
from serverless-plugins.
Correct, I have this:
QueueName:
Type: "AWS::SQS::Queue"
Properties:
QueueName: QueueName
VisibilityTimeout: 30
MessageRetentionPeriod: 1209600
the setup works correctly in AWS but not with serverless-ofline-sqs.
Is something wrong in these configs?
from serverless-plugins.
I think I got why, Queue creation is not done by default by serverless-offline-sqs
you need to activate it with option autoCreate: true
and have a sqs localy running:
you find more details in the Configuration SQS section of the README:
https://github.com/CoorpAcademy/serverless-plugins/tree/master/packages/serverless-offline-sqs#sqs
from serverless-plugins.
hey, I've tried that without success, I debugged the plugin and the issue seems to be at serverless-offline-sqs/src/index.js:211
(it seems that it breaks before checking autoCreate param)
client.getQueueUrl({QueueName}, cb)
call is raising an exception.
If change the line to const { QueueUrl } = await fromCallback(cb =>
http://localhost:9324/queue/${QueueName}`);` does not throw the exception below.
Tried serverless-offline-sqs from versions 5.12.1 down to 5.9.0; all of them with same results.
After changing the mentioned line serverless runs again but will not invoke handlers when new messages arrives. Checked manually creating all the queues with correct names and it did not invoke handlers either.
This is the error I'm getting:
A W S. Simple Queue Service. Non Existent Queue --------
AWS.SimpleQueueService.NonExistentQueue: The specified queue does not exist for this wsdl version.
at Request.extractError (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at Request.emit (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at callNextListener (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
at IncomingMessage.onEnd (/home/comtom/Projects/electric/api-middleware/node_modules/aws-sdk/lib/event_listeners.js:307:13)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 10.19.0
Framework Version: 1.67.0
Plugin Version: 3.6.3
SDK Version: 2.3.0
Components Version: 2.27.0
from serverless-plugins.
Found that the config block was incorrectly indented. Now is working perfectly!!!
I think perhaps adding an error saying that the config is not there could be helpful. Thanks for your support :)
from serverless-plugins.
@comtom How so? I am experiencing the same error message but cannot find why my config is wrong. Especially after I just copied it from the docs lol.
Update - Fixed
My issues was having another sqs queue (a DLQ) in the resources section of serverless.yml
. Because this is not used to trigger a lambda I tried to create it manually only and everything fired up! 🎆
from serverless-plugins.
Related Issues (20)
- Error upon installing serverless-offline-sqs HOT 1
- [serverless-offline-sqs] Can't create explicit queues on AWS or sqslite
- [serverless-offline-sqs] Uncaught exceptions from SQS handler functions terminates nodejs process
- [serverless-offline-sqs] Support for maximumBatchingWindow HOT 1
- Support removed for node 14; please restore HOT 1
- [serverless-offline-sqs] TypeError: Cannot read property 'debug' of undefined
- support serverless-offline 12
- [serverless-offline-dynamodb-streams] Error: Cannot find module 'serverless-offline/lambda' HOT 3
- Guide for setting up serverless-offline-sqs + serverless-lift + localstack sqs HOT 3
- serverless won't start if serverless-offline-dynamodb-streams table or stream does not exist
- Support of dynamodb event stream filterPatterns HOT 1
- Cannot find module 'source-map-support/register'
- serverless-offline-dynamodb-streams is still using aws-sdk@v2
- serverless offline startup fails due to serverless-offline-kinesis build error
- Severless Offline SQS using AWS SDK v2
- Is this repo still maintained? HOT 1
- [serverless-offline-sqs] Doesn't trigger lambda when new message is added to elasticMQ
- [serverless-offline-sqs] support serverless-offline v13 HOT 1
- serverless-offline running forever
- serverless-offline-sqs breaks when upgrading @aws-sdk from 3.226.0 to 3.556.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-plugins.