{"id":20290629,"url":"https://github.com/notdodo/sparktrail","last_synced_at":"2026-04-18T00:32:37.725Z","repository":{"id":170742369,"uuid":"610033415","full_name":"notdodo/sparktrail","owner":"notdodo","description":"Query AWS CloudTrail using Spark (python) to perform analysis","archived":false,"fork":false,"pushed_at":"2026-01-31T19:22:46.000Z","size":235,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-01T07:20:12.048Z","etag":null,"topics":["aws","cloudtrail","log","spark"],"latest_commit_sha":null,"homepage":"https://github.com/notdodo/sparktrail","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/notdodo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-05T23:56:48.000Z","updated_at":"2026-01-31T19:22:49.000Z","dependencies_parsed_at":"2023-10-14T20:17:24.406Z","dependency_job_id":"e4c9e825-c175-42fb-bbc1-6b4a5678fc8a","html_url":"https://github.com/notdodo/sparktrail","commit_stats":null,"previous_names":["notdodo/sparktrail"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/notdodo/sparktrail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notdodo%2Fsparktrail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notdodo%2Fsparktrail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notdodo%2Fsparktrail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notdodo%2Fsparktrail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notdodo","download_url":"https://codeload.github.com/notdodo/sparktrail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notdodo%2Fsparktrail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","cloudtrail","log","spark"],"created_at":"2024-11-14T15:08:33.007Z","updated_at":"2026-04-18T00:32:37.577Z","avatar_url":"https://github.com/notdodo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SparkTrail [![CodeQL](https://github.com/notdodo/SparkTrail/actions/workflows/codeql.yml/badge.svg)](https://github.com/notdodo/SparkTrail/actions/workflows/codeql.yml)\n\nUse this Python script to start a Spark standalone session to interact with the CloudTrail bucket.\nSpark allow to query the logs using a SQL-like syntax.\n\nThe startup `main.py` script will automatically load SSO credentials and set AWS temporary credentials from the SSO to authenticated to the bucket.\n\n## Usage\n\n0. Spawn Poetry shell:\n\n`poetry shell`\n\n1. Start the cluster:\n\n`PYSPARK_DRIVER_PYTHON=ipython PYTHONSTARTUP=main.py pyspark --packages org.apache.hadoop:hadoop-aws:3.3.4,com.amazonaws:aws-java-sdk-bundle:1.12.262 --driver-memory 15G --executor-memory5G --name SparkTrail`\n\n2. Now the environment is configured and to start running queries link the S3 bucket. When the IPython shell is created, link the bucket and start performing queries:\n\n```python\nspark = link_s3(\"audit-cloudtrail-logs/AWSLogs/\")\nspark.select(\"Records.eventName\").distinct().show(10)\n```\n\n### Notes\n\n- You can use this script to any bucket with partitioned JSON files (e.g., Databricks audit logs)\n- You may need to adjust the memory sizing to fit your environment\n- You need to `aws sso login` before running the command\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotdodo%2Fsparktrail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotdodo%2Fsparktrail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotdodo%2Fsparktrail/lists"}