Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/build-on-aws/golang-gin-app-on-aws-lambda
Take a URL shortener application written using Gin, and run it as a serverless Lambda function.
https://github.com/build-on-aws/golang-gin-app-on-aws-lambda
gin golang lambda serverless
Last synced: about 2 months ago
JSON representation
Take a URL shortener application written using Gin, and run it as a serverless Lambda function.
- Host: GitHub
- URL: https://github.com/build-on-aws/golang-gin-app-on-aws-lambda
- Owner: build-on-aws
- License: mit-0
- Created: 2023-07-07T11:38:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-19T00:17:00.000Z (about 1 year ago)
- Last Synced: 2024-12-17T17:40:55.231Z (2 months ago)
- Topics: gin, golang, lambda, serverless
- Language: Go
- Homepage: https://community.aws/tutorials/golang-and-aws-lambda/02-golang-gin-app-on-aws-lambda
- Size: 1.16 MB
- Stars: 19
- Watchers: 5
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Run a Golang Gin application as a Serverless AWS Lambda function
One 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&sc_campaign=datamlwave&sc_content=golang-gin-app-on-aws-lambda&sc_geo=mult&sc_country=mult&sc_outcome=acq) functions fronted by [Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html?sc_channel=el&sc_campaign=datamlwave&sc_content=golang-gin-app-on-aws-lambda&sc_geo=mult&sc_country=mult&sc_outcome=acq).

The 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&sc_campaign=datamlwave&sc_content=golang-gin-app-on-aws-lambda&sc_geo=mult&sc_country=mult&sc_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&sc_campaign=datamlwave&sc_content=golang-gin-app-on-aws-lambda&sc_geo=mult&sc_country=mult&sc_outcome=acq).
## Security
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
## License
This library is licensed under the MIT-0 License. See the LICENSE file.