This repository contains application and infrastructure code for a serverless API built with Go and AWS Lambda.
This is the API powering the SIRI Certified Web app.
If you want to create this API within your own AWS account, you can follow the following steps using the Makefile commands provided. You will need a Pulumi account and have the Pulumi CLI installed. The subsequent steps will not work without it.
- Activate your AWS profile
export AWS_PROFILE=your-profile-name-here
- Create the Coginto User Pool and associated Client App. Take note of the user pool ID and client app ID exported at the end. You will need those next.
make cognito
- Create a
.env
file inside theinfrastructure
repository
touch infrastructure/.env
- Add the following environment variables to your
.env
file. Use the values exported from step 2 above.
COGNITO_CLIENT_APP_ID=
COGNITO_ENDPOINT_URL=
- Build the code for the authentication, companies and users Lambdas
make build-authentication && make build-companies && make build-users
- Create the rest of the infrastructure. Take note of the API endpoint URL exported. This is the endpoint used for your API gateway
make infra
If you ever want to tear down the infrastructure, run the following:
make destroy-cognito && make destroy