{"id":18602109,"url":"https://github.com/build-on-aws/golang-gin-app-on-aws-lambda","last_synced_at":"2025-06-22T00:37:12.591Z","repository":{"id":184966457,"uuid":"663478441","full_name":"build-on-aws/golang-gin-app-on-aws-lambda","owner":"build-on-aws","description":"Take a URL shortener application written using Gin, and run it as a serverless Lambda function.","archived":false,"fork":false,"pushed_at":"2023-12-19T00:17:00.000Z","size":1219,"stargazers_count":20,"open_issues_count":4,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-31T01:31:40.472Z","etag":null,"topics":["gin","golang","lambda","serverless"],"latest_commit_sha":null,"homepage":"https://community.aws/tutorials/golang-and-aws-lambda/02-golang-gin-app-on-aws-lambda","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/build-on-aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-07T11:38:32.000Z","updated_at":"2025-03-04T04:39:32.000Z","dependencies_parsed_at":"2023-07-31T06:51:53.056Z","dependency_job_id":null,"html_url":"https://github.com/build-on-aws/golang-gin-app-on-aws-lambda","commit_stats":null,"previous_names":["build-on-aws/golang-gin-app-on-aws-lambda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Fgolang-gin-app-on-aws-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Fgolang-gin-app-on-aws-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Fgolang-gin-app-on-aws-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/build-on-aws%2Fgolang-gin-app-on-aws-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/build-on-aws","download_url":"https://codeload.github.com/build-on-aws/golang-gin-app-on-aws-lambda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252712628,"owners_count":21792347,"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":["gin","golang","lambda","serverless"],"created_at":"2024-11-07T02:10:22.026Z","updated_at":"2025-05-06T15:29:05.522Z","avatar_url":"https://github.com/build-on-aws.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run a Golang Gin application as a Serverless AWS Lambda function\n\nOne of the previous blog posts ([Can I run existing Go applications on AWS Lambda?](https://community.aws/tutorials/golang-and-aws-lambda/01-golang-apis-on-aws-lambda)) introduced you to the [AWS Lambda Go API Proxy](https://github.com/awslabs/aws-lambda-go-api-proxy), and how it's framework/package specific adapter implementations (for `gorilla/mux`, `echo` and `net/http`) allow you to run existing Go applications as [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html?sc_channel=el\u0026sc_campaign=datamlwave\u0026sc_content=golang-gin-app-on-aws-lambda\u0026sc_geo=mult\u0026sc_country=mult\u0026sc_outcome=acq) functions fronted by [Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html?sc_channel=el\u0026sc_campaign=datamlwave\u0026sc_content=golang-gin-app-on-aws-lambda\u0026sc_geo=mult\u0026sc_country=mult\u0026sc_outcome=acq). \n\n![How does the Gin adapter work](images/arch.png)\n\nThe AWS Lambda Go API Proxy also supports the [Gin](https://github.com/gin-gonic/gin), which one of the most popular Go web frameworks! This blog post demonstrates how take an existing URL shortener service written using the `Gin` framework, and run it as a serverless AWS Lambda function. Instead of using AWS SAM, we will change things up a bit and use the [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/home.html?sc_channel=el\u0026sc_campaign=datamlwave\u0026sc_content=golang-gin-app-on-aws-lambda\u0026sc_geo=mult\u0026sc_country=mult\u0026sc_outcome=acq) to deploy the solution. AWS CDK is a framework that lets you define your cloud infrastructure as code in one of its supported programming and provision it through [AWS CloudFormation](https://aws.amazon.com/cloudformation/?sc_channel=el\u0026sc_campaign=datamlwave\u0026sc_content=golang-gin-app-on-aws-lambda\u0026sc_geo=mult\u0026sc_country=mult\u0026sc_outcome=acq).\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis library is licensed under the MIT-0 License. See the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuild-on-aws%2Fgolang-gin-app-on-aws-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuild-on-aws%2Fgolang-gin-app-on-aws-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuild-on-aws%2Fgolang-gin-app-on-aws-lambda/lists"}