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-07-31T05:55:50.000Z (over 1 year ago)
- Last Synced: 2023-08-20T07:22:18.244Z (over 1 year 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.09 MB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
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).
![How does the Gin adapter work](images/arch.png)
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.