AWS Assignment– 4
DevOps & CI/CD Services
Basic Questions
- Create a new CodeCommit repository named devops-repo.
- Clone the CodeCommit repository to your local system using HTTPS.
- Configure IAM credentials and push a sample application code to the repository.
- Set up Cloud9 IDE and clone the CodeCommit repo inside it.
- Create a CodeBuild project that compiles a simple Python app.
- Define a basic buildspec.yml file for CodeBuild.
- Run the CodeBuild project and view build logs in the console.
- Store build artifacts in an S3 bucket from CodeBuild.
- Create a CodeDeploy application for EC2 deployment.
- Configure an IAM Role for CodeDeploy with EC2 and S3 access.
- Install the CodeDeploy agent on an EC2 instance.
- Deploy a sample HTML app to EC2 using CodeDeploy.
- Create a CodePipeline with CodeCommit → CodeBuild → S3 stages.
- Trigger the pipeline by pushing a commit to CodeCommit.
- View execution history of the pipeline.
- Add a manual approval stage to the pipeline.
- Modify the pipeline to include CodeDeploy as the deploy stage.
- Monitor pipeline execution events in CloudWatch.
- Enable notifications for pipeline status via SNS.
- Write a short note on the difference between CodePipeline and Jenkins.
Intermediate Questions
- Create a CodeCommit repo with branch policies to enforce PR reviews.
- Configure webhooks from CodeCommit to trigger CodePipeline automatically.
- Integrate CodeBuild with GitHub as an additional source provider.
- Use CodeBuild environment variables to pass build-time configurations.
- Create a multi-stage build in CodeBuild (install → build → test).
- Enable build caching in CodeBuild for faster builds.
- Store CodeBuild logs in CloudWatch and enable log retention.
- Configure CodeDeploy to perform rolling updates on EC2 instances.
- Test an EC2 deployment rollback using CodeDeploy.
- Create a CodeDeploy deployment for ECS containers.
- Deploy a Lambda function update using CodeDeploy.
- Create a CodePipeline that includes: Source (CodeCommit), Build (CodeBuild), Deploy (CodeDeploy).
- Configure pipeline stages in YAML via CloudFormation.
- Add a CloudWatch alarm to trigger rollback in CodeDeploy.
- Create a CodePipeline approval stage that requires IAM user confirmation.
- Use Parameter Store to inject secrets into CodeBuild at runtime.
- Enable cross-region replication of a CodeCommit repo.
- Integrate CodePipeline with Slack for build/deploy notifications.
- Create a Cloud9 workspace with IAM role permissions for CodeCommit.
- Document how AWS Developer Tools map to GitHub + Jenkins equivalents.
Advanced Questions
- Create a monorepo in CodeCommit and configure CodeBuild to build only specific directories.
- Write a Terraform script to provision CodeCommit, CodeBuild, CodeDeploy, and CodePipeline end-to-end.
- Implement a blue-green deployment for an ECS service using CodeDeploy.
- Configure a pipeline that uses CodeBuild to build Docker images and push to ECR.
- Extend the pipeline to deploy ECR images to ECS using CodeDeploy.
- Automate Lambda deployments via CodePipeline (source → build → deploy).
- Implement canary deployment strategy with CodeDeploy for ECS.
- Create a pipeline with multiple environments (Dev → Stage → Prod) using CodePipeline.
- Secure the full CI/CD pipeline with IAM least-privilege roles and KMS-encrypted artifacts.
- Final Hands-on Project:
- CodeCommit repo with sample app
- CodeBuild project with test & artifact upload
- CodeDeploy for EC2 + ECS deployment
- CodePipeline integrating all stages with approvals
- Cloud9 IDE for development
- Notifications + monitoring with CloudWatch + SNS
- Document CI/CD best practices on AWS