{"id":17983507,"url":"https://github.com/techjacker/go-serverless-api","last_synced_at":"2025-08-28T16:56:38.009Z","repository":{"id":57500074,"uuid":"129615748","full_name":"techjacker/go-serverless-api","owner":"techjacker","description":"Boilerplate Golang API with AWS Severless Application Model (SAM) Deployment to AWS Lambda \u0026 API Gateway","archived":false,"fork":false,"pushed_at":"2018-04-18T09:27:45.000Z","size":16,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T23:10:20.712Z","etag":null,"topics":["aws-lambda","aws-sam","golang","serverless"],"latest_commit_sha":null,"homepage":"https://andrewgriffithsonline.com/blog/180412-migrate-go-api-to-serverless-under-10-mins","language":"Go","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/techjacker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-15T14:01:51.000Z","updated_at":"2024-03-10T09:37:13.000Z","dependencies_parsed_at":"2022-08-28T16:10:45.883Z","dependency_job_id":null,"html_url":"https://github.com/techjacker/go-serverless-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fgo-serverless-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fgo-serverless-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fgo-serverless-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fgo-serverless-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techjacker","download_url":"https://codeload.github.com/techjacker/go-serverless-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222090823,"owners_count":16929472,"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":["aws-lambda","aws-sam","golang","serverless"],"created_at":"2024-10-29T18:17:26.141Z","updated_at":"2024-10-29T18:17:26.889Z","avatar_url":"https://github.com/techjacker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/techjacker/go-serverless-api.svg?branch=master)](https://travis-ci.org/techjacker/go-serverless-api)\n[![Go Report Card](https://goreportcard.com/badge/github.com/techjacker/go-serverless-api)](https://goreportcard.com/report/github.com/techjacker/go-serverless-api)\n\n# go-serverless-api\n- Boilerplate Golang API\n- AWS Severless Application Model (SAM) Deployment to AWS Lambda \u0026 API Gateway\n\n\n-----------------------------------------------------------\n## Deploy to AWS\n\n#### 1. Build and package into a zip\n```Shell\n$ make bundle-lambda\n```\n\n#### 2. Upload zip to AWS S3 \u0026 create updated SAM template (`packaged-template.yaml`)\n```shell\n$ aws s3 mb s3://my-bucket\n\n$ aws cloudformation package \\\n    --template-file template.yaml \\\n    --s3-bucket my-bucket \\\n    --output-template-file packaged-template.yaml\n```\n\n#### 2. Deploy to AWS Lambda \u0026 API Gateway with updated SAM template\n```shell\n$ aws cloudformation deploy \\\n    --template-file packaged-template.yaml \\\n    --stack-name go-serverless-api-stack \\\n    --capabilities CAPABILITY_IAM\n```\n\n#### 3. Test\nAWS API Gateway addresses take the following format.\n```\nhttps://\u003capi-rest-id\u003e.execute-api.\u003cyour-aws-region\u003e.amazonaws.com/\u003capi-stage\u003e\n```\n\n```Shell\n$ aws apigateway get-rest-apis\n{\n    \"items\": [\n        {\n            \"id\": \"0qu18x8pyd\",\n            \"name\": \"go-serverless-api-stack\",\n            \"createdDate\": 1523987269,\n            \"version\": \"1.0\",\n            \"apiKeySource\": \"HEADER\",\n            \"endpointConfiguration\": {\n                \"types\": [\n                    \"EDGE\"\n                ]\n            }\n        }\n    ]\n}\n```\n\n```Shell\n$ curl -s https://0qu18x8pyd.execute-api.eu-west-1.amazonaws.com/Stage/healthz\nok\n$ curl -s https://0qu18x8pyd.execute-api.eu-west-1.amazonaws.com/Prod/healthz\nok\n```\n\n#### 4. Delete Stack\n```shell\n$ aws cloudformation delete-stack \\\n\t--stack-name go-serverless-api-stack\n```\n\n\n\n-----------------------------\t------------------------------\n## Local Development\n#### Build \u0026 Run API\n```shell\n$ make run\n```\n\n#### Manually call APi\n```shell\n$ make test-run\n```\n\n-----------------------------------------------------------\n## Tests\n```\n$ go test ./...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Fgo-serverless-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechjacker%2Fgo-serverless-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Fgo-serverless-api/lists"}