I'm trying to set up Lambda transformations with a Firehose delivery stream. I have an IAM role defined for the Firehose which includes the following policy document:
{
"Statement": {
"Action": [
"lambda:InvokeFunction",
"lambda:GetFunctionConfiguration"
],
"Resource": [<Arn>, ...],
"Effect": "Allow"
}
}
I've also granted sts:AssumeRole access to the Lambda role from Firehose.
This should theoretically grant my Firehose "Invoke" access to the specified lambda ARNs. But the transforms are failing with
{
"errorCode":"Lambda.InvokeAccessDenied",
"errorMessage":"Access was denied. Ensure that the access policy allows access to the Lambda function."
}
and no function invocations are apparent from the Lambda console. Do I have my IAM components configured correctly? Or could something else be going wrong here?
Kinesis Data Firehose can invoke your Lambda function to transform incoming source data and deliver the transformed data to destinations. You can enable Kinesis Data Firehose data transformation when you create your delivery stream.
Lambda supports the following options for Kinesis event sources. Kinesis stream – The Kinesis stream to read records from. Consumer (optional) – Use a stream consumer to read from the stream over a dedicated connection. Batch size – The number of records to send to the function in each batch, up to 10,000.
Amazon Kinesis Data Firehose captures, transforms, and loads streaming data into downstream services such as Kinesis Data Analytics or Amazon S3. You can write Lambda functions to request additional, customized processing of the data before it is sent downstream.
You can configure Amazon Kinesis Data Streams to send information to a Kinesis Data Firehose delivery stream.
This statement works for me. Note the :*
at the end of the resource.
{
"Sid": "",
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction",
"lambda:GetFunctionConfiguration"
],
"Resource": "arn:aws:lambda:us-west-2:11111111111:function:transform-lambda:*"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With