How dcutivao/my-website-app works
Project Type and Purpose
• This is an infrastructure-as-code project that uses Terraform to deploy AWS resources. The project is intended to practice AWS CodePipeline along with setting up supporting AWS components such as S3 for hosting (i.e., a website) and IAM for managing permissions.
• The README (“Repocitorio para practica AWS codepipeline”) confirms that this repository is focused on practicing AWS CodePipeline.
Analyzing the File Structure
• Top-Level Files: Files like .gitignore, index.html, error.html, main.tf, outputs.tf, terraform.tfstate, terraform.tfvars, and variables.tf indicate that Terraform is used to provision resources.
• Modules Directory: Contains separate subdirectories for each AWS component:
• modules/codepipeline: Contains Terraform scripts for setting up the CodePipeline (with variables, outputs, and main definitions).
• modules/iam: Contains Terraform code for IAM resources.
• modules/s3: Contains Terraform code for S3 resources.
• The “web” Directory contains static HTML files (index.html and error.html), which likely represent the content of the website hosted on S3.
Key Components
a. AWS CodePipeline: Highlight this as the central component driving continuous delivery/deployment.
b. AWS IAM: Represents the security and permissions layer used by CodePipeline and other AWS services.
c. AWS S3: Acts as the storage layer for static web content (hosted website) and may hold artifacts during the pipeline execution.
d. Terraform Infrastructure: Indicate that Terraform automates the provisioning and management of these resources.
e. Web Content: Represents the static website resources (HTML files) that are deployed to S3.
Relationships and Interactions
• The Terraform code orchestrates the creation of all AWS resources.
• CodePipeline will manage the CI/CD flow, which likely pulls the website content and deploys it to S3.
• IAM roles/policies (defined within the IAM module) secure the interactions between CodePipeline, S3, and any other AWS services involved.
• S3 not only serves as a storage repository for the website files but possibly also serves the website directly to end users.