This repo contains code necessary to spin up general infrastructure resources for this project. This includes DynamoDB, S3, and pushing a config file to S3.
You must make a copy of example_reddit.cfg
and rename it to reddit.cfg
and replace the contents with your own values before starting.
-
Installs - see the prerequisites section on this page for additional information, the steps are essentially:
- Install Terraform CLI
- Install AWS CLI and run
aws configure
and enter in your aws credentials.
-
Clone this repository
-
From within this repository run the following:
terraform init terraform workspace new dev terraform plan -var-file="dev.tfvars" -out=dev-plan.out terraform apply -var-file="dev.tfvars" dev-plan.out
For deploying to prd
terraform workspace new prd # or terraform workspace select prd if already created terraform plan -var-file="prd.tfvars" -out=prd-plan.out terraform apply -var-file="prd.tfvars" prd-plan.out
Although Reddit-Scraping depends on this repo, I decided to make this a separate repo because I wanted to reduce the likelihood that a table is dropped while developing and using the scraping infrastructure.