Skip to content

kariemoorman/aws-static-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

10 Weeks of CloudOps Challenge

WEEK 1: Static Website with CI/CD Implementation

IMPLEMENTATION

STEP 1:

  • Provision S3 bucket, write HTML to S3, add READ policy to S3, and configure static website documents using Terraform (see step1).
terraform init # Initialize working directory
terraform validate # Verify syntax and dependencies
terraform plan # Preview changes to be made
terraform apply -auto-approve # Apply changes to infrastructure

http-site


  • Current Issues:
    • No custom domain name.
    • No cache for static files.
    • Public bucket; not aligned with security best practices.
    • Does not support HTTPS.

STEP 2:

terraform init # Initialize working directory
terraform validate # Verify syntax and dependencies
terraform plan # Preview changes to be made
terraform apply -auto-approve # Apply changes to infrastructure

cf-site


STEP 3:

  • Integrate AWS with Github Actions:
    • Create Github User in AWS (see step3).
    • Create Access Keys for Github User.
    • Add Access Keys to Github Secrets.
    • Sync Github Repo to S3 (see sync_to_s3.yml).

STEP 4:

  • Tear down infrastructure using Terraform.
terraform destroy -auto-approve

RESOURCES


MIT License