{"id":37137118,"url":"https://github.com/liamross/appsync-terraform-go-example","last_synced_at":"2026-01-14T15:58:52.031Z","repository":{"id":53895521,"uuid":"321129033","full_name":"liamross/appsync-terraform-go-example","owner":"liamross","description":"An example Terraform configuration to launch an AppSync service with a Go Lambda data source","archived":false,"fork":false,"pushed_at":"2020-12-15T00:09:21.000Z","size":9,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-19T02:08:10.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","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/liamross.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}},"created_at":"2020-12-13T18:12:23.000Z","updated_at":"2024-03-08T01:33:17.000Z","dependencies_parsed_at":"2022-08-13T03:31:12.086Z","dependency_job_id":null,"html_url":"https://github.com/liamross/appsync-terraform-go-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liamross/appsync-terraform-go-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamross%2Fappsync-terraform-go-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamross%2Fappsync-terraform-go-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamross%2Fappsync-terraform-go-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamross%2Fappsync-terraform-go-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liamross","download_url":"https://codeload.github.com/liamross/appsync-terraform-go-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamross%2Fappsync-terraform-go-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"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":[],"created_at":"2026-01-14T15:58:51.431Z","updated_at":"2026-01-14T15:58:52.019Z","avatar_url":"https://github.com/liamross.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppSync Terraform Go example\n\nAn example [Terraform](https://www.terraform.io/) configuration to launch an [AWS AppSync](https://aws.amazon.com/appsync/) service with a [Go](https://golang.org/) Lambda data source.\n\nThis repo is the complete code example from a blog post I wrote called [Easy AWS AppSync with Terraform](https://elopmental.dev/easy-appsync-with-terraform/).\n\n\u003e Note: the Makefile may only run on macOS/linux, if you are on Windows you may\n\u003e need to build the Go lambda function another way.\n\n### About the contents of this repo:\n\n- Lambda functions are in the `/functions` directory\n- Apache Velocity resolver templates are inside the `/resolvers` directory\n- The GraphQL schema is in `schema.graphql`\n- All Terraform config is within the following 3 files:\n  - `variables.tf` has variables used throughout the rest of the config\n  - `iam.tf` contains AWS IAM roles and policies\n  - `main.tf` contains the code for generating all other required services\n\n### Before publishing:\n\n1. [Download Terraform](https://www.terraform.io/downloads.html)\n1. Have an existing local AWS credentials profile (this is required so Terraform has the permissions to publish your AWS service)\n1. Have Go installed (required to run commands to build the Go lambda function)\n1. Open `variables.tf` and set them to whatever you want\n\n\u003e Note: if you want your state to persist, remove the line from `.gitignore` that says `*.tfstate`. This state is essential to keep track of your AWS resources in order to successfully update or destroy them.\n\n### To publish:\n\nWarning: this will fall within the free tier for AWS, however if you have had your account for longer than 1 year you may be charged a small amount for executing AppSync queries since the free tier for AppSync is only 12 months. If you still want to deploy it, the cost should be minimal (cents, not dollars).\n\n1. Run `terraform init` to initialize terraform and fetch all the resources\n1. Run `make build` to build the Go lambda function binary\n1. Run `terraform plan` to view the diff and all the created resources\n1. Run `terraform apply` to publish (it will prompt you to type \"yes\" to confirm)\n\n\u003e Once this is done you can view your [AppSync console](https://console.aws.amazon.com/appsync/home) and run queries to test that the Lambda data source is working!\n\n### To destroy\n\n1. Run `terraform destroy` to remove all AWS services (it will prompt for \"yes\" again)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamross%2Fappsync-terraform-go-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliamross%2Fappsync-terraform-go-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamross%2Fappsync-terraform-go-example/lists"}