A reference project to deploy a serverless, full-stack React app onto AWS with Terraform. Inspired by this YouTube tutorial by Code Engine
A to-do list app which allows users to create, and read to-do's from DynamoDB
App URL here
Make sure you have installed Terraform, AWS CLI, and configured a default
AWS CLI profile (see doc here)
terraform -help # prints Terraform options
which aws # prints /usr/local/bin/aws
aws --version # prints aws-cli/2.0.36 Python/3.7.4 Darwin/18.7.0 botocore/2.0.0
aws configure # configure your AWS CLI profile
Create a Github project, and generate a personal access token (see doc here)
Populate deploy/02-variables.tf
variable "github_token" {}
variable "github_username" {
default = "your_github_username"
}
variable "github_project_name" {
default = "your_github_project_name"
}
variable "bucket_name" {
default = "your_unique_s3_bucket_name"
}
cd deploy # change to deploy directory
terraform init # initialises Terraform
terraform apply # deploys AWS stack
terraform destroy # destroys AWS stack
When prompted for github_token
, provide the value and hit Return
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.