Simple static website deployed to an AWS account of choice using Terraform.
The static website featured in this repository (src
folder) is a sample used for testing purposes: HTML, CSS & JavaScript are taken from this codepen.
Technologies
- Terraform;
- AWS (S3, CloudFront, CloudWatch);
- Bash;
- HTML;
- CSS;
- JavaScript;
- An AWS account;
- The following CLI software installed and correctly configured in your local environment:
- An S3 bucket already existing and located in your AWS account, where the Terraform state will be stored remotely;
# Make script executable
chmod +x ./scripts/deploy.sh
# Preview a Terraform infra deployment
./scripts/deploy.sh
# Deploy the whole stack
./scripts/deploy.sh apply
# Make script executable
chmod +x ./scripts/deploy-frontend-assets.sh
# Deploy the static assets
./scripts/deploy-frontend-assets.sh
# Make script executable
chmod +x ./scripts/deploy-terraform.sh
# Preview a terraform infra deployment
./scripts/deploy-terraform.sh
# Deploy the Terraform infra
./scripts/deploy-terraform.sh apply
# Make script executable
chmod +x ./scripts/destroy-stack.sh
# Destroy all the Terraform infra (including the static frontend assets)
./scripts/destroy-stack.sh
# Make script executable
chmod +x ./scripts/load-test.sh
# Sent HTTP requests to given url
./scripts/load-test.sh "https://xxxxxxxxxxx.cloudfront.net/"
- Improve documentation;
- Create deployment pipelines using Github Actions;