Skip to content

This project maintains the lambda wrote in Golang to generate a JWT token based on the user.

Notifications You must be signed in to change notification settings

leonardo-avila/jwt-lambda

Repository files navigation

Food Totem JWT Lambda Project

Build Deploy

This project maintains the lambda wrote in Golang to generate a JWT token based on the user.

In case the archive point some error to generate the lambda zip file on the root of the project run the following commands to generate the binary manually:

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GOFLAGS=-trimpath go build -mod=readonly -ldflags='-s -w' -o bootstrap main.go

This project could be deployed using the command above to create the binary file, and then the following command:

terraform apply --auto-approve

Besides that, the GitHub Action workflow configured in this project already has the steps to generate the binary and deploy the lambda to AWS.

This project Terraform also contains the resources to generate the API Gateway and the IAM Role to allow the lambda to be executed, and this project is being used, after some phases of the project, to deploy the RabbitMQ used by the microservices of Food Totem. This decision was made considering that the RabbitMQ should be deployed before the microservices, to have the load balancer available to be referenced in the microservices.

About

This project maintains the lambda wrote in Golang to generate a JWT token based on the user.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published