serverless-plugins
serverless-plugins copied to clipboard
sqs does not work in combination with normal http events
I'm not able to get serverless-offline-sqs working in combination with "normal" HTTP lambdas. After adding the plugin in the serverless.yml, serverless offline does not start the HTTP server anymore. But the sqs triggered lambda is working great. Do I miss something here?
My versions:
"serverless": "2.66.2",
"serverless-offline": "8.2.0",
"serverless-offline-sqs": "6.0.0",
serverless.yml
plugins:
- serverless-webpack
- serverless-offline-sqs
- serverless-offline
custom:
serverless-offline-sqs:
autoCreate: false
apiVersion: '2012-11-05'
endpoint: http://0.0.0.0:9324
region: ${self:provider.region}
accessKeyId: root
secretAccessKey: root
skipCacheInvalidation: false
functions:
httpsLambda:
name: x
handler: x
events:
- http:
path: /x
method: post
sqsLambda:
name: y
handler: y
events:
- sqs:
arn: arn:aws:sqs:${self:provider.region}:${self:custom.accountId}:${self:custom.queue}
batchSize: 1
resources:
Resources:
queue:
Type: AWS::SQS::Queue
Properties:
QueueName: ${self:custom.queue}
VisibilityTimeout: 300 # 5min
ContentBasedDeduplication: true
With this plugin order, the http server is starting again, but the sqs lambda gets not triggered anymore.
plugins:
- serverless-webpack
- serverless-offline
- serverless-offline-sqs
I got the same issue when running serverless offline, but it worked with serverless offline start
Thank you very much! This works also for me.
Worked for me as well. Thank you :)
adding start after serverless offline worked for me too!