{"id":19274092,"url":"https://github.com/sbstjn/go-lambda-example","last_synced_at":"2025-04-21T22:33:32.343Z","repository":{"id":63807915,"uuid":"118179517","full_name":"sbstjn/go-lambda-example","owner":"sbstjn","description":"Example AWS Lambda function in Go and SAM","archived":false,"fork":false,"pushed_at":"2018-10-18T02:20:22.000Z","size":61,"stargazers_count":51,"open_issues_count":3,"forks_count":15,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T16:31:52.571Z","etag":null,"topics":["apigateway","cloudformation","golang","lambda","sam","serverless"],"latest_commit_sha":null,"homepage":"https://sbstjn.com/golang-lambda-with-aws-sam-serverless-application-model.html","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/sbstjn.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":"2018-01-19T21:17:41.000Z","updated_at":"2024-05-18T15:48:00.000Z","dependencies_parsed_at":"2022-11-26T14:07:48.155Z","dependency_job_id":null,"html_url":"https://github.com/sbstjn/go-lambda-example","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/sbstjn%2Fgo-lambda-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fgo-lambda-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fgo-lambda-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fgo-lambda-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbstjn","download_url":"https://codeload.github.com/sbstjn/go-lambda-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250145427,"owners_count":21382413,"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":["apigateway","cloudformation","golang","lambda","sam","serverless"],"created_at":"2024-11-09T20:45:02.416Z","updated_at":"2025-04-21T22:33:32.066Z","avatar_url":"https://github.com/sbstjn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda Go Example\n\n## Dependecies\n\n```bash\n$ \u003e go get github.com/aws/aws-lambda-go/events\n$ \u003e go get github.com/aws/aws-lambda-go/lambda\n$ \u003e go get github.com/stretchr/testify/assert\n```\n\n## Build\n\n```bash\n# Build binary\n$ \u003e make build\n\n# Test Go Code\n$ \u003e make test\n```\n\n## Deploy\n\n### Create .env\n\n```bash\nAWS_ACCOUNT_ID=1234567890\nAWS_BUCKET_NAME=your-bucket-name-for-cloudformation-package-data\nAWS_STACK_NAME=your-cloudformation-stack-name\nAWS_REGION=us-west-1\n```\n\n### Install AWS CLI\n\n```bash\n$ \u003e brew install awscli\n```\n\n### Command\n\n```bash\n# Create S3 Bucket\n$ \u003e make configure\n\n# Upload data to S3 Bucket\n$ \u003e make package\n\n# Deploy CloudFormation Stack\n$ \u003e make deploy\n```\n\n## Usage\n\n```bash\n$ \u003e make outputs\n\n[\n  {\n    \"OutputKey\": \"URL\",\n    \"OutputValue\": \"https://random-id.execute-api.us-west-1.amazonaws.com/Prod\",\n    \"Description\": \"URL for HTTPS Endpoint\"\n  }\n]\n\n$ \u003e curl https://random-id.execute-api.us-west-1.amazonaws.com/Stage/people\n\n{\"data\":[{\"id\":\"d1\",\"name\":\"Anton\",\"age\":31},{\"id\":\"c2\",\"name\":\"Frank\",\"age\":28},{\"id\":\"b1\",\"name\":\"Horst\",\"age\":42}]}\n\n$ \u003e curl https://random-id.execute-api.us-west-1.amazonaws.com/Stage/person/b1\n\n{\"data\":{\"id\":\"b1\",\"name\":\"Horst\",\"age\":42}}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fgo-lambda-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbstjn%2Fgo-lambda-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fgo-lambda-example/lists"}