{"id":28410040,"url":"https://github.com/crowdstrike/aws-kinesis-falcon-logscale-lambda-integration","last_synced_at":"2025-10-26T23:33:53.581Z","repository":{"id":151168103,"uuid":"569446811","full_name":"CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration","owner":"CrowdStrike","description":"A Python AWS Lambda function to send AWS Kinesis stream events to Falcon LogScale","archived":false,"fork":false,"pushed_at":"2023-12-15T14:44:14.000Z","size":403,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T10:53:40.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrowdStrike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-22T21:08:04.000Z","updated_at":"2023-03-29T00:29:49.000Z","dependencies_parsed_at":"2023-06-06T12:40:41.917Z","dependency_job_id":null,"html_url":"https://github.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrowdStrike%2FAWS-Kinesis-Falcon-Logscale-Lambda-Integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrowdStrike%2FAWS-Kinesis-Falcon-Logscale-Lambda-Integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrowdStrike%2FAWS-Kinesis-Falcon-Logscale-Lambda-Integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrowdStrike%2FAWS-Kinesis-Falcon-Logscale-Lambda-Integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrowdStrike","download_url":"https://codeload.github.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrowdStrike%2FAWS-Kinesis-Falcon-Logscale-Lambda-Integration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257588625,"owners_count":22569146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-02T11:09:54.350Z","updated_at":"2025-10-26T23:33:53.576Z","avatar_url":"https://github.com/CrowdStrike.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CrowdStrike Kinesis Lambda](https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/cs-logo.png)\n\n[![Twitter URL](https://img.shields.io/twitter/url?label=Follow%20%40CrowdStrike\u0026style=social\u0026url=https%3A%2F%2Ftwitter.com%2FCrowdStrike)](https://twitter.com/CrowdStrike)\u003cbr/\u003e\n\n# AWS Lambda Function: Kinesis to Falcon LogScale Shipper\n\nA Python AWS Lambda function to send AWS Kinesis stream events to Falcon LogScale.\n\n## Installation and Setup\n\n### Prepare AWS Kinesis\n\n- create a Kinesis data source, or identify an existing source\n\n\n\n### Prepare AWS Lambda \n\n- create a new Python (`python3.9`) AWS Lambda function to host the code\n  - copy/paste the `lambda_function.py` code to the new Lambda function `lambda_function.py`\n- create new file named `logscale.py`, in the Lambda function\n  - copy/paste the `logscale.py` code\n\u003cp align=\"left\"\u003e\u003cimg width=\"200px\" src=\"https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/lambda_src_tree.png\"\u003e\u003c/p\u003e\n\n- configure required Lambda environmental variables\n  - HOST - target LogScale server\n  - REPOSITORY - target LogScale repository\n  - TOKEN - LogScale ingest token\n\u003cp align=\"left\"\u003e\u003cimg width=\"500px\" src=\"https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/env_vars.png\"\u003e\u003c/p\u003e\n\n- configure the lambda run timeout setting\n  - increase the function timeout value above the default (3 secs)\n    - recommend at least thirty (30) seconds.  monitor logs for timeouts.\n\n#### Attach Requests Lambda Layer\n\n- Attach a Lambda layer that contains the python requests library\n    - create a new layer; upload zipfile that contains requests library\n    - or, attach and existing requests layer to the Lambda\n\n#### Enable a Kinesis Trigger\n\n- Enable a lambda trigger from the kinesis source\n\u003cp align=\"left\"\u003e\u003cimg width=\"500px\" src=\"https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/lambda_trigger.png\"\u003e\u003c/p\u003e\n\n#### Create Lambda Test Events\n\n- create test events; test the function\n\n#### Edit `lambda_function.py`\n\n\n##### set the HecEvent source and sourcetype\n\n- source - set to a unique name for the kinesis stream\n- sourcetype - set to the destination LogScale ingest parser name\n```python\n    # suggestion: set the source field to uniquely identify the CloudTrail stream\n    source = \"my-kinesis-stream\"\n    # requirment: set the sourcetype to the target ingest parser name\n    sourcetype = \"aws-kinesis\"\n    hec_event = HecEvent(host=LOGSCALEHOST, index=REPOSITORY, source=source, sourcetype=sourcetype)\n```\n##### create additional HEC event fields (optional)\n```python\n    # optional: additional hec fields\n    # example\n    #   hev['fields'].update({\"trigger\": \"kinesis\"})\n    #   field name: \"trigger\"; field value: \"kinesis\"\n    hev['fields'].update({\"trigger\": \"kinesis\"})\n```\n\n\n### Prepare LogScale\n\n#### Setup the Ingest Repository\n\n- create a new target ingest repository, or select an existing repository\n\n\u003cp align=\"left\"\u003e\u003cimg width=\"500px\" src=\"https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/new_repo.png\"\u003e\u003c/p\u003e\n\n- create an ingest token, or use the default token\n- configure ingest parsing\n    - kinesis outer event format is JSON\n        - `parseJson()  | @timezone := \"Z\"`\n    - kinesis event payload (`kinesis.data`) format varies according to stream format - `[JSON|CSV|TSV|SYSLOG]`\n        - e.g. JSON `parseJson(field=kinesis.data)`\n    - example JSON parser (see `aws-kinesis-json.yaml`):\n        - `parseJson()  | @timezone := \"Z\" | parseJson(field=kinesis.data)`\n\u003cp align=\"left\"\u003e\u003cimg width=\"500px\" src=\"docs/assets/parser_json.png\"\u003e\u003c/p\u003e\n\n- Note: event timestamp is set to lambda ingest time; timezone is GMT\n\n---\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/cs-logo-footer.png\"\u003e\u003cBR/\u003e\u003cimg width=\"250px\" src=\"https://raw.githubusercontent.com/CrowdStrike/AWS-Kinesis-Falcon-Logscale-Lambda-Integration/main/docs/assets/adversary-red-eyes.png\"\u003e\u003c/p\u003e\n\u003ch3\u003e\u003cp align=\"center\"\u003eWE STOP BREACHES\u003c/p\u003e\u003c/h3\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdstrike%2Faws-kinesis-falcon-logscale-lambda-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrowdstrike%2Faws-kinesis-falcon-logscale-lambda-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdstrike%2Faws-kinesis-falcon-logscale-lambda-integration/lists"}