# AWS Pipeline

> Generate AWS CodePipeline + CodeBuild CI/CD configuration

- Skill: `erp-core-dev/aws-pipeline` (Agent Skill)
- Install (CLI): `npx skillmds@latest add erp-core-dev/aws-pipeline`
- Raw SKILL.md: https://api.skillmd.com/api/skills/erp-core-dev/aws-pipeline/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: ERP-CORE-DEV (https://skillmd.com/u/erp-core-dev)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/erp-core-dev/aws-pipeline

---


# AWS CI/CD Pipeline

Generate AWS CodePipeline with CodeBuild for the given service.

## Pipeline Stages

### 1. Source
- CodeStar connection to GitHub/Bitbucket
- S3 artifact bucket for pipeline artifacts
- Branch filter: main for production, develop for staging

### 2. Build
- CodeBuild project with buildspec.yml
- Install dependencies, run linter, compile
- Run unit tests with coverage report
- Build Docker image, push to ECR
- Cache: S3 or local Docker layer cache

### 3. Test
- Integration tests against staging environment
- Security scan: Trivy for container, CodeGuru for code
- Publish test results to CodeBuild reports

### 4. Deploy
- EKS: kubectl apply via CodeBuild or Helm upgrade
- ECS: CodeDeploy blue-green with approval gate
- Lambda: SAM deploy with canary traffic shifting
- Manual approval action before production deploy

## Best Practices
- Separate buildspec files per stage (buildspec-build.yml, buildspec-test.yml)
- IAM role per CodeBuild project with least privilege
- Encrypt artifacts with KMS
- SNS notification on pipeline failure
- CloudWatch Events for pipeline monitoring

## Arguments
- `<service-name>`: Service name in kebab-case
- `--deploy-target=<eks|ecs|lambda>`: Deployment target

