This service manages user sign-up/sign-in functionality and returns an access token to the client. It integrates seamlessly with AWS Secrets Manager and Cognito for secure authentication.
The service is packaged as a Docker image and pushed to Amazon ECR. A Lambda Function is deployed using the container image. CI/CD is implemented via GitHub Actions, which automatically runs test jobs upon creating a pull request. To deploy the service, trigger the GitHub Action job titled 'Deploy to AWS'.
This service can be run locally using Docker or deployed to AWS using Terraform. Follow the installation steps below based on your preferred environment.
go install github.com/vektra/mockery/v2@v2.50.4
-
Extract files under
C:\Program Files
-
Add
C:\Program Files\mingw64\bin
to the system's environment variablePath
-
Rename the executable under the
bin
folder frommingw32-make
tomake
-
Verify the installation by running the following command in the Command Prompt:
make -v
-
Download Terraform
-
Extract the downloaded file to
C:\Program Files\HashiCorp\Terraform
-
Add the Terraform directory to your system's
Path
in the Environment Variables. -
Verify the installation by running the following command in the Command Prompt:
terraform version
If you want to locally test the Docker image that is built for the Lambda Function.
make build
make local_run
- Sign Up
curl "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"version":"2.0","path":"/v1/users","httpMethod":"POST","body":"{\"username\":\"<username>\",\"email\":\"<email>\",\"password\":\"<password>\"}","isBase64Encoded":false}'
Use the make
command to deploy the service to your desired environment:
- Replace
ENV=dev
with your target environment, e.g., dev, stag, prod. - Ensure that your AWS credentials are properly configured before deployment.
make tf_init ENV=dev
make tf_plan
make tf_deploy