AWS Assignment– 4

DevOps & CI/CD Services

Basic Questions

  1. Create a new CodeCommit repository named devops-repo.
  2. Clone the CodeCommit repository to your local system using HTTPS.
  3. Configure IAM credentials and push a sample application code to the repository.
  4. Set up Cloud9 IDE and clone the CodeCommit repo inside it.
  5. Create a CodeBuild project that compiles a simple Python app.
  6. Define a basic buildspec.yml file for CodeBuild.
  7. Run the CodeBuild project and view build logs in the console.
  8. Store build artifacts in an S3 bucket from CodeBuild.
  9. Create a CodeDeploy application for EC2 deployment.
  10. Configure an IAM Role for CodeDeploy with EC2 and S3 access.
  11. Install the CodeDeploy agent on an EC2 instance.
  12. Deploy a sample HTML app to EC2 using CodeDeploy.
  13. Create a CodePipeline with CodeCommit → CodeBuild → S3 stages.
  14. Trigger the pipeline by pushing a commit to CodeCommit.
  15. View execution history of the pipeline.
  16. Add a manual approval stage to the pipeline.
  17. Modify the pipeline to include CodeDeploy as the deploy stage.
  18. Monitor pipeline execution events in CloudWatch.
  19. Enable notifications for pipeline status via SNS.
  20. Write a short note on the difference between CodePipeline and Jenkins.

Intermediate Questions

  1. Create a CodeCommit repo with branch policies to enforce PR reviews.
  2. Configure webhooks from CodeCommit to trigger CodePipeline automatically.
  3. Integrate CodeBuild with GitHub as an additional source provider.
  4. Use CodeBuild environment variables to pass build-time configurations.
  5. Create a multi-stage build in CodeBuild (install → build → test).
  6. Enable build caching in CodeBuild for faster builds.
  7. Store CodeBuild logs in CloudWatch and enable log retention.
  8. Configure CodeDeploy to perform rolling updates on EC2 instances.
  9. Test an EC2 deployment rollback using CodeDeploy.
  10. Create a CodeDeploy deployment for ECS containers.
  11. Deploy a Lambda function update using CodeDeploy.
  12. Create a CodePipeline that includes: Source (CodeCommit), Build (CodeBuild), Deploy (CodeDeploy).
  13. Configure pipeline stages in YAML via CloudFormation.
  14. Add a CloudWatch alarm to trigger rollback in CodeDeploy.
  15. Create a CodePipeline approval stage that requires IAM user confirmation.
  16. Use Parameter Store to inject secrets into CodeBuild at runtime.
  17. Enable cross-region replication of a CodeCommit repo.
  18. Integrate CodePipeline with Slack for build/deploy notifications.
  19. Create a Cloud9 workspace with IAM role permissions for CodeCommit.
  20. Document how AWS Developer Tools map to GitHub + Jenkins equivalents.

Advanced Questions

  1. Create a monorepo in CodeCommit and configure CodeBuild to build only specific directories.
  2. Write a Terraform script to provision CodeCommit, CodeBuild, CodeDeploy, and CodePipeline end-to-end.
  3. Implement a blue-green deployment for an ECS service using CodeDeploy.
  4. Configure a pipeline that uses CodeBuild to build Docker images and push to ECR.
  5. Extend the pipeline to deploy ECR images to ECS using CodeDeploy.
  6. Automate Lambda deployments via CodePipeline (source → build → deploy).
  7. Implement canary deployment strategy with CodeDeploy for ECS.
  8. Create a pipeline with multiple environments (Dev → Stage → Prod) using CodePipeline.
  9. Secure the full CI/CD pipeline with IAM least-privilege roles and KMS-encrypted artifacts.
  10. 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