{"id":20595733,"url":"https://github.com/firetail-io/firetail-appsync-lambda","last_synced_at":"2025-10-24T15:39:22.385Z","repository":{"id":65320593,"uuid":"571975177","full_name":"FireTail-io/firetail-appsync-lambda","owner":"FireTail-io","description":"Recieves Cloudwatch logs of AppSync APIs \u0026 forwards them to Firetail","archived":false,"fork":false,"pushed_at":"2025-05-16T07:43:14.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-15T06:01:02.285Z","etag":null,"topics":["appsync","appsync-graphql-api","aws-lambda","go","golang","graphql","observability","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FireTail-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2022-11-29T09:43:00.000Z","updated_at":"2025-05-13T09:05:50.000Z","dependencies_parsed_at":"2025-07-15T03:39:45.087Z","dependency_job_id":null,"html_url":"https://github.com/FireTail-io/firetail-appsync-lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FireTail-io/firetail-appsync-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireTail-io%2Ffiretail-appsync-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireTail-io%2Ffiretail-appsync-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireTail-io%2Ffiretail-appsync-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireTail-io%2Ffiretail-appsync-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FireTail-io","download_url":"https://codeload.github.com/FireTail-io/firetail-appsync-lambda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireTail-io%2Ffiretail-appsync-lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280821827,"owners_count":26397425,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["appsync","appsync-graphql-api","aws-lambda","go","golang","graphql","observability","serverless","serverless-framework"],"created_at":"2024-11-16T08:13:59.002Z","updated_at":"2025-10-24T15:39:22.368Z","avatar_url":"https://github.com/FireTail-io.png","language":"Go","readme":"# Firetail AppSync Lambda\n\n[![License: LGPL v3](https://img.shields.io/badge/License-LGPL_v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) ![Test and coverage](https://github.com/FireTail-io/firetail-appsync-lambda/actions/workflows/codecov.yml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/FireTail-io/firetail-appsync-lambda/branch/main/graph/badge.svg?token=GEPKMSC5ID)](https://codecov.io/gh/FireTail-io/firetail-appsync-lambda)\n\nThe Firetail AppSync Lambda recieves Cloudwatch log events from AppSync APIs, and forwards request and response data to [Firetail.App](https://firetail.app/).\n\n\n\n## Tests\n\nTests can be run with the standard `go test` command. [stretchr/testify](https://github.com/stretchr/testify) has been used for shorthand assertions. \n\nA [Makefile](./Makefile) is provided which is used by [this GitHub action](./.github/workflows/codecov.yml) to upload coverage reports to Codecov. The Makefile can be used to generate the same coverage report locally, which you can then view in your browser using `go tool cover`:\n\n```bash\nmake test\ngo tool cover -html coverage.out\n```\n\n\n\n## Setup Guide\n\n1. [Install dependencies](#installing-dependencies)\n2. [Configure the AppSync app's Cloudwatch logs](#configuring-appsync)\n3. [Generate a Firetail API token](#generating-a-firetail-api-token)\n4. [Build the Firetail AppSync Lambda](#building-the-firetail-appsync-lambda)\n5. [Deploy the Firetail AppSync Lambda with Serverless](#deploying-the-firetail-appsync-lambda-with-serverless)\n\n\n\n### Installing Dependencies\n\nBuilding and deploying the Firetail AppSync Lambda requires the following dependencies:\n\n- A Go installation - see the [Download and Install instructions at go.dev](https://go.dev/doc/install)\n- The Serverless CLI - see [Setting Up Serverless Framework With AWS at serverless.com](https://www.serverless.com/framework/docs/getting-started)\n\n\n\n### Configuring AppSync\n\nBefore deploying the Firetail AppSync Lambda, ensure the AppSync app is configured to log to Cloudwatch. The corresponding [AWS documentation can be found here](https://docs.aws.amazon.com/appsync/latest/devguide/monitoring.html).\n\nIt is recommended to:\n\n- Enable **Include verbose content**\n- Set the **Field resolver log level** to **All**\n\n📝 Take note of the name of the Cloudwatch log group for the AppSync app, as this will be required when deploying the Firetail AppSync Lambda. It should be of the format `/aws/appsync/apis/{graphql_api_id}`.\n\n\n\n### Generating A Firetail API Token\n\nIn order to deploy the Firetail AppSync Lambda, an API token from the Firetail SaaS is required. \n\nCreate an account at [Firetail.App](https://firetail.app/), then:\n\n1. If you do not already have an organisation: go to [firetail.app/organisations](https://firetail.app/organisations), click **Create Organisation**, select a plan, and give the organisation a name and description.\n2. On the organisation page visit the **Applications** tab\\* and click **Create Application**. Give the application a name.\n3. On the application page visit the **APIs** tab\\*\\* and click **Create API**. Give the API a name and set the **API Type** to **GraphQL**. \n4. On the API page visit the **Tokens** tab\\*\\*\\* and click **Create Token**. Give the token a name, then take note of the **Token Secret** as this will be required when deploying the Firetail AppSync Lambda. 📝\n\n\\*`https://firetail.app/organisations/your-org-id/applications`\n\n\\*\\*`https://firetail.app/organisations/your-org-id/applications/your-app-id/apis` \n\n\\*\\*\\*`https://firetail.app/organisations/your-org-id/applications/your-app-id/apis/your-api-id/tokens`\n\n\n\n### Building The Firetail AppSync Lambda\n\nThe process of building the Firetail AppSync Lambda binary can be performed using [the Makefile at the root of this repository](./Makefile), using the `build` target:\n\n```bash\ngit clone git@github.com:FireTail-io/firetail-appsync-lambda.git\ncd firetail-appsync-lambda\nmake build\n```\n\nA more in-depth explanation of how to build the Firetail AppSync Lambda from source can be found in [docs/build-from-src.md](./docs/build-from-src.md).\n\n\n\n### Deploying The Firetail AppSync Lambda With Serverless\n\nA [serverless.yml](./serverless.yml) is provided in the root of this repository, which has two parameters:\n\n1. `cloudwatch-log-group`, the log group for an AppSync API in Cloudwatch (see [Configuring AppSync📝](#configuring-appsync))\n2. `firetail-api-token`, an API token from the Firetail SaaS (see [Generating a Firetail API Token📝](#generating-a-firetail-api-token))\n\nGiven these two values, the Lambda can be deployed by running the following serverless command from the root of the repository:\n\n```bash\nsls deploy --param=\"cloudwatch-log-group=YOUR_CLOUDWATCH_LOG_GROUP\" --param=\"firetail-api-token=YOUR_FIRETAIL_API_TOKEN\"\n```\n\nThis serverless command may require additional flags depending upon the use case, for example to specify the region in which the Lambda should be deployed. See `sls deploy --help` for a list of available flags.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiretail-io%2Ffiretail-appsync-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiretail-io%2Ffiretail-appsync-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiretail-io%2Ffiretail-appsync-lambda/lists"}