简体   繁体   中英

AWS - How can I create event source mapping for fifo lambda?

I'm trying to create an event source mapping with the AWS cli, but I keep getting a combination of errors that don't add up. Here's what I've tried:

  1. aws lambda create-event-source-mapping --function-name someFunctionName --batch-size 100 --starting-position LATEST --event-source arn:aws:sqs:eu-central-1:someARN:SomeQueue.fifo This results in: An error occurred (InvalidParameterValueException) when calling the CreateEventSourceMapping operation: StartingPosition is not valid for SQS event sources.

  2. Then I try without the starting position: aws lambda create-event-source-mapping --function-name someFunctionName --batch-size 100 --event-source arn:aws:sqs:eu-central-1:someARN:SomeQueue.fifo which results in: error: argument --starting-position is required

Am I missing something? How am I supposed to call this command?

aws -version tells me I'm running aws-cli/1.15.10 Python/2.7.9 Windows/2012Server botocore/1.10.10 . Is this just an out of date version?

So, as I'm writing this question I upgrade the cli to 2.0.9 and option 2 works!!!

Upgraded the cli to 2.0.9 and option 2 works!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM