Skip to main content

Command Palette

Search for a command to run...

AWS CI/CD Pipeline for Website Deployment

Updated
3 min read
O

I’m actively building my career in DevOps by focusing on hands-on infrastructure, automation, and cloud fundamentals. My approach is simple: learn by doing, document the process, and improve with every project.

I have a strong foundation in Linux, CI/CD, containers, and AWS, and I’m currently expanding into Infrastructure as Code and monitoring. Most of my work involves creating labs, deploying cloud resources, and building repeatable automation workflows.

Core skills-

Linux administration & shell scripting Git/GitHub workflows CI/CD with Jenkins & GitHub Actions Docker & container fundamentals Kubernetes basics (Minikube, EKS) AWS: EC2, S3, IAM, VPC, RDS, Load Balancers

Currently learning-

Terraform & Ansible Monitoring with Prometheus, Grafana & CloudWatch DevOps security best practices

This hashnode account documents my learning journey — projects, setup guides, troubleshooting notes, and practical DevOps experiments. I’m focused on growing into a reliable engineer who can design, automate, and maintain scalable systems.

Overview

This project demonstrates an end-to-end CI/CD pipeline on AWS for automatically deploying a static website hosted on Amazon S3.

The pipeline integrates GitHub, AWS CodePipeline, AWS CodeBuild, and Amazon S3 to automate the process of fetching source code, building the application, and deploying the latest version of the website.

Architecture

Services Used

  • Amazon S3

  • AWS CodePipeline

  • AWS CodeBuild

  • GitHub

  • AWS IAM

  • AWS CodeStar Connections

Resources Created

S3 Buckets

app-artifacts

Used by CodePipeline to store build and deployment artifacts.

app-destination

Used to host the static website and store deployment files.

Workflow

Step 1: Create S3 Buckets

Created two S3 buckets:

  • app-artifacts

  • app-destination

Step 2: Create GitHub Repository

  • Created a simple static website.

  • Added project files to GitHub.

  • Configured GitHub as the source repository.

Step 3: Configure GitHub Connection

  • Created a GitHub connection using CodeStar Connections.

  • Authorized AWS to access the repository.

  • Connected GitHub with AWS services securely.

Step 4: Create CodeBuild Project

Configured AWS CodeBuild to:

  • Pull source code from the pipeline.

  • Process build instructions.

  • Generate deployment artifacts.

Step 5: Create CodePipeline

Configured a three-stage pipeline:

Source Stage

  • GitHub Repository

Build Stage

  • AWS CodeBuild

Deploy Stage

  • Amazon S3

Step 6: Deploy Website

Pipeline execution flow:

  1. Code pushed to GitHub.

  2. CodePipeline detects changes.

  3. Source code is fetched.

  4. CodeBuild processes the application.

  5. Deployment artifacts are generated.

  6. Files are deployed to the S3 bucket.

First Time Deployment (Before changes):

After Changes has been made: Whenever code is pushed to GitHub, a webhook triggers CodePipeline. The pipeline fetches the latest source code, passes it to CodeBuild to generate build artifacts, and then automatically deploys the updated website to an S3 bucket hosting the static site.

Step 7: Verify Website

Successfully accessed the deployed static website through Amazon S3 hosting.

Challenges Faced

S3 Object Ownership and ACL Configuration

While configuring deployment, the pipeline encountered issues related to S3 Object Ownership settings and ACL restrictions. The issue was resolved by reviewing bucket permissions and deployment configuration.

GitHub Trigger Configuration

Troubleshooting was required to understand automatic pipeline execution and GitHub integration.

Key Learnings

  • CI/CD fundamentals

  • AWS CodePipeline

  • AWS CodeBuild

  • GitHub integration with AWS

  • S3 static website hosting

  • Artifact management

  • IAM permissions

  • S3 Object Ownership and ACLs

  • Automated deployment workflows

Outcome

Successfully built and deployed a static website using an automated CI/CD pipeline on AWS. The project provided hands-on experience with source control integration, build automation, artifact management, and deployment automation.