[SOLVED] AWS SQS lambda trigger not created

Hi guys,

I’ve been trying to create an SQS trigger for a specific lambda. I’d been able to do that before but I’m not sure what I’m doing wrong now. I’ve tried to use different indentation but none worked:

api-xxx-xxx:
  name: ${self:provider.stage}-xxx-xxx-xxx-xxx
  handler: api/xxx.xxx
  events:
    - sqs:
        arn: arn:aws:sqs:xxx:xxx:xxx
        batchSize: 1

I’ve added all the necessary permissions, and I’m able to create the SQS trigger for the same lambda in the AWS console.
The SQS is properly created, and I’ve also tried to create the trigger with the hardcoded sqs arn to rule out the possibility that I’m obtaining the wrong arn.

serverless version: 1.31.0.

Any advice?

Solved. Terminal was invoking globally installed 1.27.3 serverless package. Upgrade did the job.