Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using serverless-offline-sqs #101

Open
andrereliquias opened this issue Sep 20, 2021 · 6 comments
Open

Using serverless-offline-sqs #101

andrereliquias opened this issue Sep 20, 2021 · 6 comments

Comments

@andrereliquias
Copy link

andrereliquias commented Sep 20, 2021

I'm currently on a project where I'm using the following plugins: serverless-offline, serverless-offline-sqs and serverless-lift. When I try to run 'serverless offline', for each environment declared in the worker this error is being raised:

offline: MissingRequiredParameter: Missing required key 'QueueName' in params at ParamValidator.fail.

Is there any configuration where I can fix this error?

@andrereliquias andrereliquias changed the title Using serveless offline Using serverless offline Sep 20, 2021
@mnapoli mnapoli changed the title Using serverless offline Using serverless-offline-sqs Sep 21, 2021
@mnapoli
Copy link
Member

mnapoli commented Sep 21, 2021

Hi, just to be sure: do you load serverless-offline-sqs after serverless-offline in serverless.yml? (see CoorpAcademy/serverless-plugins#5 (comment))

If that still doesn't solve your problem, I see that this PR might help: CoorpAcademy/serverless-plugins#6 It isn't documented but it seems to be:

custom:
  serverless-offline-sqs:
    QueueName: abc

@alex88
Copy link

alex88 commented Nov 20, 2021

I gave it a try using:

constructs:
  my-queue:
    type: queue
    worker:
      handler: queue.handler
      memorySize: 512
      timeout: 10

custom:
  serverless-offline:
    useChildProcesses: true
  serverless-offline-sqs:
    autoCreate: true
    apiVersion: '2012-11-05'
    endpoint: http://0.0.0.0:9324
    region: eu-west-1
    accessKeyId: root
    secretAccessKey: root
    skipCacheInvalidation: false

plugins:
  - serverless-lift
  - serverless-offline
  - serverless-offline-sqs

the app now starts (serverless-offline-sqs doesn't create the queue in elasticMq though, even when using QueueName).
The problem is that when trying to push the messages I get:

{
    "errorMessage": "Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1",
    "errorType": "Error",
    "stackTrace": [
        "Error: connect EHOSTUNREACH 169.254.169.254:80"
    ]
}

has anyone ever been able to get it to work?

Update: nvm it seems that we have to wait for #93 anyway

@gravi2
Copy link

gravi2 commented Feb 11, 2022

@alex88 did you find any work around for this?

@alex88
Copy link

alex88 commented Feb 14, 2022

@gravi2 unfortunately not, ended up not using serverless and making a regular app

@eitanfr
Copy link

eitanfr commented Aug 31, 2022

any updates about this issue?

@moioo91120
Copy link

moioo91120 commented Nov 9, 2023

Hello, any updates ?
I tried to use the "extensions" without sucess.
Like

  constructs: {
    QueueJob: {
      type: 'queue',
      fifo: 'true',
      worker: {
        handler: 'src/job/job.handler',
      },
      extensions: {
        queue: {
          QueueName: 'Hello',
        },
        dlq: {
          QueueName: 'Hello dlq',
        },
      },
    },
  },

Error is still "MissingRequiredParameter: Missing required key 'QueueName' in params"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants