{"id":26964327,"url":"https://github.com/mimani68/elk-lambda-query","last_synced_at":"2026-05-05T23:32:54.996Z","repository":{"id":164055991,"uuid":"639521085","full_name":"mimani68/elk-lambda-query","owner":"mimani68","description":"Eleastich search lambda query","archived":false,"fork":false,"pushed_at":"2023-05-11T16:23:04.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T06:36:49.488Z","etag":null,"topics":["aws","aws-lambda","elasticsearch","elk","function-as-a-service","functions","golang","serverless"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mimani68.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-11T16:12:08.000Z","updated_at":"2023-05-11T16:20:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"66e8592a-f85a-4a5a-8c11-20bf1e5ffa1e","html_url":"https://github.com/mimani68/elk-lambda-query","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mimani68/elk-lambda-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimani68%2Felk-lambda-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimani68%2Felk-lambda-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimani68%2Felk-lambda-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimani68%2Felk-lambda-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimani68","download_url":"https://codeload.github.com/mimani68/elk-lambda-query/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimani68%2Felk-lambda-query/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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","aws-lambda","elasticsearch","elk","function-as-a-service","functions","golang","serverless"],"created_at":"2025-04-03T06:30:35.165Z","updated_at":"2026-05-05T23:32:54.991Z","avatar_url":"https://github.com/mimani68.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elasticsearch indirect query\n\nThis is a sample template for ***elk-function-as-service*** - Below is a brief explanation of what we have generated for you:\n\n```bash\n.\n├── Makefile              \u003c-- Make to automate build\n├── README.md             \u003c-- This instructions file\n├── update-report         \u003c-- Source code for a lambda function\n│   ├── main.go           \u003c-- Lambda function code\n│   └── main_test.go      \u003c-- Unit tests\n├── query                 \u003c-- Source code for a lambda function\n│   ├── main.go           \u003c-- Lambda function code\n│   └── main_test.go      \u003c-- Unit tests\n└── template.yaml\n```\n\n## Requirements\n\n* AWS CLI already configured with Administrator permission\n* [Docker installed](https://www.docker.com/community-edition)\n* [Golang](https://golang.org)\n* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)\n\n## Setup process\n\n### Installing dependencies \u0026 building the target \n\nIn this example we use the built-in `sam build` to automatically download all the dependencies and package our build target.   \nRead more about [SAM Build here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-build.html) \n\nThe `sam build` command is wrapped inside of the `Makefile`. To execute this simply run\n \n```shell\nmake\n```\n\n### Local development\n\n**Invoking function locally through local API Gateway**\n\n```bash\nsam local start-api\n```\n\nIf the previous command ran successfully you should now be able to hit the following local endpoint to invoke your function `http://localhost:3000/query` or `http://localhost:3000/update`\n\n**SAM CLI** is used to emulate both Lambda and API Gateway locally and uses our `template.yaml` to understand how to bootstrap this environment (runtime, where the source code is, etc.) - The following excerpt is what the CLI will read in order to initialize an API and its routes:\n\n```yaml\n...\nEvents:\n    HelloWorld:\n        Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api\n        Properties:\n            Path: /query\n            Method: get\n```\n\n## Packaging and deployment\n\nAWS Lambda Golang runtime requires a flat folder with the executable generated on build step. SAM will use `CodeUri` property to know where to look up for the application:\n\n```yaml\n...\n    QueryFunction:\n        Type: AWS::Serverless::Function\n        Properties:\n            CodeUri: query/\n            ...\n```\n\nTo deploy your application for the first time, run the following in your shell:\n\n```bash\nsam deploy --guided\n```\n\nThe command will package and deploy your application to AWS, with a series of prompts:\n\n* **Stack Name**: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name.\n* **AWS Region**: The AWS region you want to deploy your app to.\n* **Confirm changes before deploy**: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes.\n* **Allow SAM CLI IAM role creation**: Many AWS SAM templates, including this example, create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. By default, these are scoped down to minimum required permissions. To deploy an AWS CloudFormation stack which creates or modifies IAM roles, the `CAPABILITY_IAM` value for `capabilities` must be provided. If permission isn't provided through this prompt, to deploy this example you must explicitly pass `--capabilities CAPABILITY_IAM` to the `sam deploy` command.\n* **Save arguments to samconfig.toml**: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run `sam deploy` without parameters to deploy changes to your application.\n\nYou can find your API Gateway Endpoint URL in the output values displayed after deployment.\n\n### Testing\n\nWe use `testing` package that is built-in in Golang and you can simply run the following command to run our tests:\n\n```shell\ngo test -v ./elks/\n```\n\n## Snapshot\n\n![](./docs/query.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimani68%2Felk-lambda-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimani68%2Felk-lambda-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimani68%2Felk-lambda-query/lists"}