Closed mluttrell closed 4 years ago
Any updates on this? It happens on the latest preview as well
Any updates to this issue? It is still failing in the version 1.9.0-preview, and this is a valuable feature for Lambda functions that I would like to use.
Thanks!
The same problem applies to
someQueue.GrantConsumeMessages(someRole)
This on the other hand works
someQueue.(someRole, "sqs:SendMessage", "sqs:GetQueueAttributes", "sqs:GetQueueUrl")
Get the same error when running
someQueue.GrantConsumeMessages(someRole)
This on the other hand works
someQueue.Grant(someRole,
"sqs:ChangeMessageVisibility",
"sqs:DeleteMessage",
"sqs:ReceiveMessage",
"sqs:GetQueueAttributes",
"sqs:GetQueueUrl"
);
Workaround:
someFunction.AddEventSourceMapping("SomeId", new EventSourceMappingProps
{
BatchSize = 10,
Enabled = true,
EventSourceArn = someQueue.QueueArn,
Target = someFunction
});
This may be fixed in the next CDK release.
This should be fixed in the current release!
Describe the bug Adding an SQS queue as an event source to a lambda function throws an exception with message "Parameter count mismatch." in C#.
To Reproduce
This example adds the queue as an event source after the function object is created, but I receive the same error if I try to add the queue as an event source at the time of function creation via the "Events" property.
Code:
Stacktrace:
Expected behavior The SQS queue is added as an event source to the lambda function.
Version: