<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3" -->

---
title: I Built a Zero-Touch CI/CD Pipeline on AWS — Here’s...
description: A hands-on walkthrough of building a fully automated CI/CD pipeline on AWS using CodePipeline, CodeBuild, ECR, and ECS with EC2 launch type. The author shares...
canonical: https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Built a Zero-Touch CI/CD Pipeline on AWS — Here’s Everything That Broke Along the Way | daily.dev
og:description: A hands-on walkthrough of building a fully automated CI/CD pipeline on AWS using CodePipeline, CodeBuild, ECR, and ECS with EC2 launch type. The author shares...
og:url: https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3
og:image: https://api.daily.dev/og/posts/pGjkjfiL3.png
og:image:alt: I Built a Zero-Touch CI/CD Pipeline on AWS — Here’s Everything That Broke Along the Way
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Built a Zero-Touch CI/CD Pipeline on AWS — Here’s Everything That Broke Along the Way

**[Medium](https://daily.dev/sources/medium_js)** · 12 min read · 3 upvotes · 0 comments

## Summary

A hands-on walkthrough of building a fully automated CI/CD pipeline on AWS using CodePipeline, CodeBuild, ECR, and ECS with EC2 launch type. The author shares the complete architecture, key configuration decisions (EC2 vs Fargate, nginx daemon mode, buildspec.yml structure), and two significant bugs encountered: an ARM vs x86 architecture mismatch when building Docker images on Apple Silicon, and Docker Hub anonymous pull rate limiting. Solutions include the --platform linux/amd64 flag and switching the base image source to Amazon ECR Public Gallery. The post also covers IAM role setup, cost breakdown, and what would be needed for a production-grade version.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@ananyagupta.august2005/i-built-a-zero-touch-ci-cd-pipeline-on-aws-heres-everything-that-broke-along-the-way-e9fa8bea3d31>

## Questions this post answers

### Why does my Docker image fail with 'no matching manifest for linux/amd64' when deploying to ECS from an Apple Silicon Mac?

Docker builds default to the architecture of the build machine, so running docker build on an Apple Silicon (ARM64) Mac produces an ARM64 image, which cannot run on a standard x86_64 t3.micro EC2 instance used by ECS. The fix is adding the --platform linux/amd64 flag to the docker build command in buildspec.yml so CodeBuild cross-compiles for x86_64 regardless of the build machine's architecture.

_Anyone shipping containers from Apple Silicon to x86 infrastructure can save this fix by tracking AWS ECS deployment gotchas on daily.dev._

### Why is my AWS CodeBuild pipeline intermittently failing with a Docker Hub rate limit error when pulling a base image like nginx:alpine?

CodeBuild environments have no persistent identity, so every build looks like a fresh anonymous client to Docker Hub, and anonymous pulls are capped aggressively, causing throttling when many builds run in a short window. The fix is switching the base image source from Docker Hub to Amazon ECR Public Gallery, for example using public.ecr.aws/nginx/nginx:alpine instead of nginx:alpine, which mirrors popular images without those rate limits.

_Teams debugging flaky CI pulls can compare registry choices like this on daily.dev before hitting the same throttling wall._

### Why does an ECS task built from an nginx Docker container keep restarting even though the deployment looks successful?

nginx defaults to daemonizing itself, forking into the background and exiting the foreground process that Docker tracks as PID 1; once that process exits, Docker considers the container's job done and stops it, causing an endless restart loop. Adding CMD ["nginx", "-g", "daemon off;"] to the Dockerfile keeps nginx running in the foreground as PID 1, keeping the container alive.

_Developers containerizing nginx or similar daemons can check patterns like this on daily.dev before shipping a silently crash-looping task._

## Similar posts on daily.dev

- [The Pipeline That Thinks: Building an AI-Powered DevSecOps Pipeline on AWS EKS](https://daily.dev/posts/the-pipeline-that-thinks-building-an-ai-powered-devsecops-pipeline-on-aws-eks-kztltafof) · Cloud Native Now · 0 upvotes · 0 comments
- [CI/CD and Gitops with Microservices: Open Ecosystem vs AWS Native](https://daily.dev/posts/ci-cd-and-gitops-with-microservices-open-ecosystem-vs-aws-native-m1qy3jdsi) · Faun · 6 upvotes · 0 comments
- [Building a Production Style Kubernetes Platform on AWS with Amazon EKS](https://daily.dev/posts/building-a-production-style-kubernetes-platform-on-aws-with-amazon-eks-dh3yqcvc2) · Medium · 3 upvotes · 0 comments
- [How I Built a Production-Ready CI/CD Pipeline for a Monorepo-Based Microservices System with Jenkins, Docker Compose, and Traefik](https://daily.dev/posts/how-i-built-a-production-ready-ci-cd-pipeline-for-a-monorepo-based-microservices-system-with-jenkins-pc85kpwji) · freeCodeCamp · 18 upvotes · 2 comments
- [Streamline your GitHub journey with AWS CodePipeline and AWS DevOps Agent](https://daily.dev/posts/streamline-your-github-journey-with-aws-codepipeline-and-aws-devops-agent-1waffhzpr) · AWS · 0 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#docker](https://daily.dev/tags/docker), [#cicd](https://daily.dev/tags/cicd)

[View this post on daily.dev](https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Built a Zero-Touch CI/CD Pipeline on AWS — Here’s Everything That Broke Along the Way","url":"https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3"},"datePublished":"2026-07-27T07:32:41.669Z","dateModified":"2026-09-13T19:29:09.385Z","description":"A hands-on walkthrough of building a fully automated CI/CD pipeline on AWS using CodePipeline, CodeBuild, ECR, and ECS with EC2 launch type. The author shares...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2353c5c898785883854ab49378b06f93?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2353c5c898785883854ab49378b06f93?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"aws,docker,cicd","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"I Built a Zero-Touch CI/CD Pipeline on AWS — Here’s Everything That Broke Along the Way"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-built-a-zero-touch-ci-cd-pipeline-on-aws-here-s-everything-that-broke-along-the-way-pgjkjfil3#faq","mainEntity":[{"@type":"Question","name":"Why does my Docker image fail with 'no matching manifest for linux/amd64' when deploying to ECS from an Apple Silicon Mac?","acceptedAnswer":{"@type":"Answer","text":"Docker builds default to the architecture of the build machine, so running docker build on an Apple Silicon (ARM64) Mac produces an ARM64 image, which cannot run on a standard x86_64 t3.micro EC2 instance used by ECS. The fix is adding the --platform linux/amd64 flag to the docker build command in buildspec.yml so CodeBuild cross-compiles for x86_64 regardless of the build machine's architecture. Anyone shipping containers from Apple Silicon to x86 infrastructure can save this fix by tracking AWS ECS deployment gotchas on daily.dev."}},{"@type":"Question","name":"Why is my AWS CodeBuild pipeline intermittently failing with a Docker Hub rate limit error when pulling a base image like nginx:alpine?","acceptedAnswer":{"@type":"Answer","text":"CodeBuild environments have no persistent identity, so every build looks like a fresh anonymous client to Docker Hub, and anonymous pulls are capped aggressively, causing throttling when many builds run in a short window. The fix is switching the base image source from Docker Hub to Amazon ECR Public Gallery, for example using public.ecr.aws/nginx/nginx:alpine instead of nginx:alpine, which mirrors popular images without those rate limits. Teams debugging flaky CI pulls can compare registry choices like this on daily.dev before hitting the same throttling wall."}},{"@type":"Question","name":"Why does an ECS task built from an nginx Docker container keep restarting even though the deployment looks successful?","acceptedAnswer":{"@type":"Answer","text":"nginx defaults to daemonizing itself, forking into the background and exiting the foreground process that Docker tracks as PID 1; once that process exits, Docker considers the container's job done and stops it, causing an endless restart loop. Adding CMD [\"nginx\", \"-g\", \"daemon off;\"] to the Dockerfile keeps nginx running in the foreground as PID 1, keeping the container alive. Developers containerizing nginx or similar daemons can check patterns like this on daily.dev before shipping a silently crash-looping task."}}]}
```

