Terraform AWS ARC Kinesis Firehose Module Usage Guide¶
Introduction¶
Purpose of the Document¶
This document provides guidelines and instructions for using the terraform-aws-arc-kinesis-firehose Terraform module to provision Amazon Kinesis Data Firehose delivery streams on AWS.
Module Overview¶
The module provisions and manages Kinesis Data Firehose delivery streams with support for multiple destinations, auto-created IAM roles, CloudWatch logging, Lambda transformation, KMS encryption, and dynamic partitioning.
Supported destinations: extended_s3, redshift, opensearch, http_endpoint
Prerequisites¶
- AWS credentials configured (via profile, environment variables, or IAM role)
- Terraform >= 1.3.0
- AWS Provider >= 5.0.0
- A working knowledge of AWS Kinesis Firehose, IAM, and Terraform
Getting Started¶
Module Source¶
Refer to the Terraform Registry for the latest version.
Integration with Existing Terraform Configurations¶
- Create a new folder in your
terraform/directory (e.g.,terraform/firehose/). - Create
main.tf,variables.tf, andoutputs.tf— use the examples as a starting point. - Configure your backend:
Required AWS Permissions¶
The AWS credentials used to run Terraform must be able to create, list, and modify:
firehose:*— Kinesis Firehose delivery streamsiam:CreateRole,iam:PutRolePolicy,iam:PassRole— IAM role for Firehoselogs:CreateLogGroup,logs:CreateLogStream— CloudWatch log group and streams3:PutObject,s3:GetBucketLocation— S3 bucket accesses:ESHttpPut(OpenSearch destination) — OpenSearch index writeslambda:InvokeFunction(if using Lambda transformation)
Module Configuration¶
Input Variables¶
For a list of input variables, see the README Inputs section.
Output Values¶
For a list of outputs, see the README Outputs section.
Module Usage¶
Basic S3¶
Delivers records to S3 with GZIP compression.
See examples/basic-s3.
S3 with KMS Encryption¶
Lambda Transformation¶
Transforms records with a Lambda function before delivery.
The Lambda function receives a batch of base64-encoded records and must return them with result: "Ok". See examples/lambda-transform.
OpenSearch¶
Delivers records to an Amazon OpenSearch Service domain.
See examples/opensearch.
Redshift¶
Stages records in S3 then COPYs them into Redshift.
See examples/redshift.
Dynamic Partitioning¶
Partitions S3 objects by extracting fields from the record payload using JQ.
See examples/dynamic-partitioning.
Reporting Issues¶
Report bugs on the GitHub repository.
Security Considerations¶
- IAM least privilege: The auto-created IAM role is scoped to the specific S3 bucket, OpenSearch domain, and Lambda function ARNs provided. Avoid using wildcard ARNs.
- KMS encryption:
enable_ssedefaults totrue. Use a customer-managed KMS key viakms_key_arnfor sensitive data. - OpenSearch access: Use
sign_aws_requests = truein the OpenSearch provider instead of embedding passwords. This avoids credential exposure and works reliably with fine-grained access control. - S3 backup: Set
s3_backup_mode = "FailedDocumentsOnly"(OpenSearch/Redshift) to retain failed records for reprocessing without storing all data twice.
Best Practices¶
Contributing and Community Support¶
Contribute by following the guidelines in CONTRIBUTING.md.
Report bugs and issues on the GitHub repository.
License¶
This module is licensed under the Apache 2.0 license. See LICENSE for details.