AWS has its own CI/CD solution called Codepipeline. Some people are excited about it, while others want to stick to their tried and trusted solutions.
Here, I attempt to list the pros and cons of Codepipeline and whether you should use it.
- Within the AWS architecture. You do not have to expose keys to the outside world to be able to trigger builds. If your CI/CD provider lies outside and gets hacked exposing AWS keys, the hacker can do anything with your AWS account.
- Pipeline as Code: Any Infrastructure as Code solution for AWS (such as Terraform or Cloud Formation) would also work for Codepipeline. Additionally, within the Codepipeline, AWS allows you to configure the build part with the help of yaml files.
- Managed by AWS: You do not have to install Codepipeline yourself, or even provision a set of agents. AWS does all of that for you.
- Fairly powerful: It gives you most features that other CI/CD providers have.
- The console UI and the overall usability is bad. With CI/CD systems, usability is often the difference between people following practices diligently and not following them.
- It forces unnecessary rules. For example, you have to specify a source, which has to be either S3, AWS CodeCommit, Github or a few others. If you want to pickup the source from a custom location, you have to come up with hacks such as specify a dummy source and then create a codebuild stage to pull the custom source.
- Codepipeline has to be composed of multiple AWS services like CodeCommit, Codebuild, Codedeploy etc. This makes it extremely complicated and overly dependent on AWS .For example, the build stage has to be a CodeBuild module. CodeBuild is another AWS service, which you can assume is similar to a build agent.
- It is a walled garden. The agents will be on AWS, the infra will be on AWS, the CI/CD server is on AWS. It makes all your infra completely dependent on AWS.
When to use Codepipeilne
- When you don’t want to expose your secrets to the outside world.
- When all your infra including the repository is hosted on AWS.
- When multiple apps have similar deployments and you want to reuse either the codebuild or the terraform modules.
When not to use Codepipeline
- When you want simplicity and don’t want to spend too much time or money managing pipelines.
- When you have multiple apps and they have different deployment styles or mechanisms.
- When your CI/CD workflow includes E2E tests and fan-in / fan-out of pipelines. GoCD excels in that, Codepipeline is average.
Overall, I would not recommend starting with Codepipeline. Use it only if it specifically works well for your use case.
If you liked this article, please share it on social media.
View my courses on Udemy — https://www.udemy.com/user/abhinav-manchanda/
Subscribe to us on Linkedin — https://www.linkedin.com/company/interleap
View all our Youtube Videos — https://www.youtube.com/channel/UC9NGO7UNyFIAK8I-as9SeLg/videos
Join our Facebook Group — https://www.facebook.com/groups/1065474107206895
Subscribe to us on Youtube for an awesome video every Wednesday!