简体   繁体   中英

Adding a Lambda function into Kinesis Firehose via Terraform

I have a firehose delivery stream storing data in S3. However, I want to add a lambda function to the delivery stream to parse data before storage.

Do I need an IAM policy in addition to kinesis policies for this purpose?

You need to add processing_configuration to your aws_kinesis_firehose_delivery_stream of type = "Lambda" . Doing this you will need to also add RoleArn to IAM role that your firehose will use to invoke the function. The role must contain the following IAM policy:

        {
            "Sid": "",
            "Effect": "Allow",
            "Action": [
                "lambda:InvokeFunction",
                "lambda:GetFunctionConfiguration"
            ],
            "Resource": "<your-lambda-function-arn>"
        }

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