This repo lets you deploy a Tailcall instance with your own config on AWS (Lambda and API Gateway). The deployment is automatically built and managed by Terraform, and it will use the config in config/config.graphql
. The whole config/
directory will be uploaded to AWS, so you can use @link
with other files in the directory.
- Install Terraform.
- Create an access key on AWS, and set your
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. - Open this repo on GitHub, click on "Use this template" to create a new repository with it, and clone it to your machine.
- In the repo's directory, run
terraform init
andterraform apply
. - Done! The API Gateway URL of your Tailcall deployment should be logged to the console. 🎉
If you change config/config.graphql
, you can update your deployment with the new config by running terraform apply
again. This will also auto-update Tailcall if a new version has been released since the last time you've applied the Terraform config.
You can configure certain functionality of your deployment by creating the config/.env
file. The following environment variables are checked:
LOG_LEVEL
: Sets minimum log level that will be uploaded to AWS CloudWatch. Available values:TRACE
(default, will log everything),DEBUG
,INFO
,WARN
,ERROR
.
If you want to delete your deployment, run terraform destroy
. This will delete your Lambda function and API Gateway from AWS.