https://github.com/paujim/pocaurora
An example API with gin
https://github.com/paujim/pocaurora
Last synced: 3 months ago
JSON representation
An example API with gin
- Host: GitHub
- URL: https://github.com/paujim/pocaurora
- Owner: paujim
- License: mit
- Created: 2021-03-01T06:02:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-23T22:41:45.000Z (about 4 years ago)
- Last Synced: 2025-01-29T18:46:44.295Z (5 months ago)
- Language: Go
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# POC Aurora
An example API with gin and Aurora ServerlessTo run set AURORA_ARN and SECRET_ARN as environmental variables (mac or linux)
```
export AURORA_ARN="AWS_AURORA_ARN"
export SECRET_ARN="AWS_SECRET_ARN"
```Then build and run the Gin server
go build .
The CDK folder has the the CDK project used to create an aurora cluster.
# Docker
To build
```
docker build -t poc:1.0 .
```To run (if running in ECS you have to set a role that allows RDS and secretmanager )
```
docker run -e AURORA_ARN='AURORA_ARN_FROM_CONSOLE' -e SECRET_ARN='SECRET_ARN_FROM_CONSOLE' -p 8080:8080 poc:1.0
```To run (if running in Locally you must specify your AWS credentials)
```
docker run -e AURORA_ARN='AURORA_ARN_FROM_CONSOLE' -e SECRET_ARN='SECRET_ARN_FROM_CONSOLE' -e AWS_REGION='REGION' -e AWS_ACCESS_KEY_ID='USER_CRED' -e AWS_SECRET_ACCESS_KEY='USER_CRED' -p 8080:8080 poc:1.0
```