lambda-kinesis-to-es

baikonur-oss/lambda-kinesis-to-es/aws

Terraform Module HCL AWS

Terraform module and Lambda for Kinesis to Elasticsearch Service logs transfer

Install
module "lambda-kinesis-to-es" {
source = "baikonur-oss/lambda-kinesis-to-es/aws"
version = "2.1.0"
}
plain text: /constructs/tfmod-baikonur-oss-lambda-kinesis-to-es-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Amazon Kinesis to Elasticsearch Service log transfer Terraform module Terraform module and Lambda for saving JSON log records from Kinesis Data Streams to Elasticsearch Service. !terraform v0.12.x ![Language grade: Python](https://lgtm.com/projects/g/baikonur-oss/terraform-aws-lambda-kinesis-to-es/context:python) Prerequisites 1. Records in Kinesis stream must be valid JSON data. Non-JSON data will be saved with unknown prefix. 1. gzipped JSON, CloudWatch Logs subscription filters log format are supported. 2. Logs without either of necessary keys listed below will be saved as unknown as well. 2. JSON data must have the following keys (key names are modifiable via variables): 1. log_type: Log type identifier. Elasticsearch indices will be created daily, one per log type: %index_name_prefix%

Inputs (23)
NameTypeDescriptionDefault
batch_sizestringMaximum number of records passed for a single Lambda invocation required
index_name_prefixstringPrefix for Elasticsearch indices names required
kinesis_stream_arnstringSource Kinesis Data Streams stream name required
elasticsearch_hoststringElasticsearch Service endpoint (without https://) required
elasticsearch_arnstringElasticsearch Service ARN required
failed_log_s3_bucketstringS3 bucket name for saving failed logs (ES API errors etc.) required
lambda_package_urlstringLambda package URL (see Usage in README) required
namestringResource name required
failed_log_s3_prefixstringPath prefix for failed logs required
timezonestringtz database timezone name (e.g. Asia/Tokyo)"UTC"
runtimestringLambda Function runtime"python3.7"
log_id_fieldstringKey name for unique log ID"log_id"
log_type_unknown_prefixstringLog type prefix for logs without log type field"unknown"
starting_positionstringKinesis ShardIterator type (see: https://docs.aws.amazon.com/kinesis/latest/APIR"TRIM_HORIZON"
log_type_field_whitelistlist(string)Log type whitelist (if empty, all types will be processed)[]
tracing_modestringX-Ray tracing mode (see: https://docs.aws.amazon.com/lambda/latest/dg/API_Tracin"PassThrough"
memorystringLambda Function memory in megabytes256
handlerstringLambda Function handler (entrypoint)"main.handler"
log_type_fieldstringKey name for log type"log_type"
log_timestamp_fieldstringKey name for log timestamp"time"
timeoutstringLambda Function timeout in seconds60
tagsmap(string)Tags for Lambda Function{}
log_retention_in_daysstringLambda Function log retention in days30
Resources (4)
aws_cloudwatch_log_groupaws_iam_role_policy_attachmentaws_lambda_event_source_mappingaws_lambda_function
Details
FrameworkTerraform Module
LanguageHCL
Version2.1.0
Cloud AWS
★ Stars6
Forks7
Total downloads7.1k
Inputs23
Resources4
LicenseMIT
Namespacebaikonur-oss
Updated