{"id":20445813,"url":"https://github.com/rapid7/le_lambda","last_synced_at":"2025-04-13T00:44:09.858Z","repository":{"id":3036304,"uuid":"45146343","full_name":"rapid7/le_lambda","owner":"rapid7","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-05T10:39:05.000Z","size":970,"stargazers_count":16,"open_issues_count":3,"forks_count":15,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-04-13T00:44:02.718Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapid7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-28T22:45:33.000Z","updated_at":"2025-03-05T10:39:09.000Z","dependencies_parsed_at":"2025-03-05T11:26:43.724Z","dependency_job_id":"39df3f07-02f9-4ce1-996f-5e9cf76d08bd","html_url":"https://github.com/rapid7/le_lambda","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fle_lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fle_lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fle_lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fle_lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapid7","download_url":"https://codeload.github.com/rapid7/le_lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650419,"owners_count":21139672,"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":"2024-11-15T10:14:20.149Z","updated_at":"2025-04-13T00:44:09.836Z","avatar_url":"https://github.com/rapid7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# le_lambda\nFollow the instructions below to send logs stored on AWS S3 to Logentries.\n\nAll source code and dependencies can be found on the [le_lambda Github page](https://github.com/logentries/le_lambda).\n\n###### Example use cases:\n* Forwarding AWS ELB and CloudFront logs\n  * (make sure to set ELB/CloudFront to write logs every 5 minutes)\n  * When forwarding these logs, the script will format the log lines according to Logentries KVP or JSON spec to make them easier to analyze\n* Forwarding OpenDNS logs\n\n## Obtain log token\n1. Log in to your Logentries account\n\n2. Add a new [token based log](https://logentries.com/doc/input-token/)\n\n## Deploy the script to AWS Lambda using AWS Console\n1. Create a new Lambda function\n\n2. Choose the Python blueprint for S3 objects\n\n   ![Choose Blueprint](https://raw.githubusercontent.com/logentries/le_lambda/master/doc/step2.png)\n\n3. Configure triggers:\n   * Choose the bucket log files are being stored in\n   * Set event type \"Object Created (All)\"\n   * Tick \"Enable Trigger\" checkbox\n\n4. Configure function:\n   * Give your function a name\n   * Set runtime to Python 2.7\n\n5. Upload function code:\n   * Create a .ZIP file, containing ```le_lambda.py``` and the folder ```certifi```\n     * Make sure the files and ```certifi``` folder are in the **root** of the ZIP archive\n   * Choose \"Upload a .ZIP file\" in \"Code entry type\" dropdown and upload the archive created in previous step\n\n6. Set Environment Variables:\n   * Token value should match UUID provided by Logentries UI or API\n   * Region should be that of your LE account - currently only ```eu```\n\n   | Key       | Value      |\n   |-----------|------------|\n   | region    | eu         |\n   | token     | token uuid |\n\n7. Lambda function handler and role\n   * Change the \"Handler\" value to ```le_lambda.lambda_handler```\n   * Choose \"Create a new role from template\" from dropdown and give it a name below.\n   * Leave \"Policy templates\" to pre-populated value\n\n8. Advanced settings:\n   * Set memory limit to a high enough value to facilitate log parsing and sending - adjust to your needs\n   * Set timeout to a high enough value to facilitate log parsing and sending - adjust to your needs\n   * Leave VPC value to \"No VPC\" as the script only needs S3 access\n     * If you choose to use VPC, please consult [Amazon Documentation](http://docs.aws.amazon.com/lambda/latest/dg/vpc.html)\n\n9. Enable function:\n   * Click \"Create function\"\n\n## Gotchas:\n   * The \"Test\" button execution in AWS Lambda will **ALWAYS** fail as the trigger is not provided by the built in test function. In order to verify, upload a sample file to source bucket\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fle_lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapid7%2Fle_lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fle_lambda/lists"}