Continuous Integration and Deployment on AWS - and a wishlist for CI/CD Tools on AWS
Tags: aws, cicd, codepipeline
Published: 2022-11-23 00:55:48

![COM307 - DevChat at re:Invent 2022](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5z75zapz5fd1pvhvdrmw.png)

As I've been [sharing](https://lockhead.info/index.php/2022/11/09/how-to-preinvent-how-builders-heros-and-ug-leader-prepare-for-reinvent-attending-remotely-and-in-person/) before, I am very fortunate this year and will be giving a DevChat at the biggest AWS conference of the world - at [re:Invent 2022](https://reinvent.awsevents.com/) in Las Vegas.

AWS offers different tools for all parts of your CI/CD lifecyle.  
In this post I am going to cover the set of Code\* tools that are available on AWS today - and will share my thoughts about what these tools are missing.

![Developer Tools on AWS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2oqjuj7t6nv16lx4y5ab.png)
As part of the preparation for the talk and as part of both my private project (code-name: [MPAGA](http://www.pegasus-galaxy.net)) and my main job @ [FICO](https://www.fico.com) I have been researching and learning a lot about CI/CD (Continuous Integration and Continuous Deployment) - and for the private projects especially around CI/CD that natively runs on [AWS](https://aws.amazon.com/getting-started/hands-on/set-up-ci-cd-pipeline/).  
I've found out that not everything that these tools offer today is perfect and wanted to share some ideas on what could be improved. Where possible or applicable, I will also propose workarounds or alternatives.  

We will look at a few of the tools in the order of the "product lifecycle":  

1. Code  
2. Build/Test  
3. Deploy  
4. Release

## Tools that are part of the "Code" phase

For the purpose of this post we are going to focus on tools that are natively offered by AWS as already mentioned and part of your CI/CD pipeline.

### AWS CodeStar - Integration of projects

![Project templates for CodeStar projects](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qd2z3v6qkl4ad0jzsyja.png)

[AWS CodeStar](https://aws.amazon.com/codestar/) enables you to quickly develop, build, and deploy applications on AWS and provides a unified interface for your project. It provides you different templates that you can choose from to quickly start your project.

It allows you to manage your team, with permissions and integrates with your existing JIRA for issue management. It also integrates with your IDE (or with [Cloud9](https://aws.amazon.com/cloud9/)).  
You can also integrate with an existing Github repository.

### AWS CodeCommit - hosted Git

[AWS CodeCommit](https://aws.amazon.com/codecommit/) is a managed service for Git (just like Bitbucket, Github, Gitlab, .... It provides a hosted "git" environment that is encrypted at rest and can be accessed using usual Git clients.

### AWS CodeGuru

[Amazon CodeGuru](https://aws.amazon.com/de/codeguru/) is a developer tool that provides intelligent recommendations to improve code quality and identify an application’s most expensive lines of code. Integrate CodeGuru into your existing software development workflow to automate code reviews during application development and continuously monitor application's performance in production and provide recommendations and visual clues on how to improve code quality, application performance, and reduce overall cost.

## Tools that are part of the "Build" or "Test" phase

### AWS CodePipeline - Tool to manage your CI/CD pipeline

[AWS CodePipeline](https://aws.amazon.com/codepipeline/) is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates.

### AWS CodeBuild - Build tool based on containers

[AWS CodeBuild](https://aws.amazon.com/codebuild/) is a fully managed continuous integration service that compiles source code, runs tests, and produces ready-to-deploy software packages.

### AWS CodeArtifact - artifact storage

[AWS CodeArtifact](https://aws.amazon.com/codeartifact/) allows you to store artifacts using popular package managers and build tools like Maven, Gradle, npm, Yarn, Twine, pip, and NuGet.

## Tools that are part of the "deploy" phase

### AWS CodeDeploy

[AWS CodeDeploy](https://aws.amazon.com/codedeploy/) is a fully managed deployment service that automates software deployments to various compute services, such as Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), AWS Lambda, and your on-premises servers.

### AWS FIS

[AWS Fault Injection Simulator (FIS)](https://aws.amazon.com/fis/) is a fully managed service for running fault injection experiments to improve an application’s performance, observability, and resiliency.

## Tools that are part of the "Release" phase

### AWS AppConfig (part of Systems Manager)

[AWS AppConfig](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html) makes it easy for customers to quickly and safely configure, validate, and deploy feature flags and application configuration.

## Wishlist

I've been able to gain some experience with the tools while working on a few projects, including [cdk-codepipeline-flutter](https://github.com/Lock128/cdk-codepipeline-flutter) and here is a list of things that I believe could be improved.  
My main focus here is on CodePipeline, as it serves as the glue between all of the other tools.

### Native branch support for CodePipelines

Working with Jenkins and the [MultiBranch](https://www.jenkins.io/doc/book/pipeline/multibranch/) plugin makes it easy to allow developers to quickly test and deploy code that they are working on using the CI/CD pipeline. Unfortunately, CodePipeline today does not allow automated branch discovery, so if you want to enable the automated execution of a pipeline for a branch, you will need to manually configure webhooks and then create a new pipeline (or delete an existing pipeline) when branches are created (or deleted). This is not easy to implement and it would be great if CodePipeline should natively allow creating a pipeline automatically for all branches of a linked Git repository.

### Additional Templates and Best Practices

When setting up a CI/CD pipeline on AWS CodePipeline, this would be easier to use if additional best practices and templates would be available as part of the tool itself. AWS is starting to promote a new Open Source project called "[Deployment Pipeline Reference Architecture](https://pipelines.devops.aws.dev/)". this is a step in the right direction, but it needs to be expanded by other flavours of a deployment pipeline. Also the code examples need to be improved, made up to date and needs to include all languages supported by [AWS CDK](https://aws.amazon.com/cdk/).  
This is critical to allow an efficient adoption of the different tools.

### Native integration of 3rd party tools

AWS CodePipeline should natively support integrations to other 3rd party tools that should be part of your CI/CD pipeline - e.g. security scans like [Aquasec](https://www.aquasec.com/) and [Checkmarx](https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwj9-YfP_8L7AhUC43cKHQPOCgYYABAAGgJlZg&ohost=www.google.com&cid=CAESbeD2BmjPEdKU4PAUHpEbMXvlhYBH6S3ul__O5RWUFo_P0Ltc9XdWSquOZ0HpCAkiVzTJ-PxdRrt0c9s5yQ6ywTidUbJALFXYhuBOFKyqRRYbUMo1SW3IulTyq2nK1q_OqAx3CyCCW96dTxAM_40&sig=AOD64_2y6GQpSMR8v-0XPgxtnPNSovlKhQ&q&adurl&ved=2ahUKEwiAhYHP_8L7AhWNyKQKHRiXC9EQ0Qx6BAgGEAE).

### Remove dependency for a specific AWS account and support Cross-Account deployments natively

As indicated in [this AWS Blog](https://aws.amazon.com/blogs/devops/complete-ci-cd-with-aws-codecommit-aws-codebuild-aws-codedeploy-and-aws-codepipeline/) post, the best practice for setting up a CI/CD pipeline and for managing your deployments is to use multiple, different accounts to manage your deployments. CI/CD should not be bound to an account level and this includes the management of your accounts that are able to access and configure the CI/CD tools.  
Maybe a good option here would be the integration with the [AWS Identity](https://aws.amazon.com/identity/) service. That might allow decoupling the CI/CD toolchain from the AWS account.

### Up to date CodeBuild images

Docker Images provided by the CodeBuild team should be updated regularly and should support all "modern" toolkits. The open source project has some activity, but an [issue](https://github.com/aws/aws-codebuild-docker-images/issues/496) for supporting newer Android versions is now open for some time...

### Publishing options to the different mobile stores (AppStore, Play Store, Windows Store, etc....) should be possible
![Flutter users](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7svcsm3fsvkcoq24bxd.png)

I've been looking at developing a mobile app using [Flutter](https://lockhead.info/index.php/2022/06/13/building-a-flutter-application-for-web-ios-and-android-using-a-ci-cd-pipeline-on-codebuild-cdk4j/), but what I have not yet been able to achieve is pushing the created and build applications to the different app stores. Today, AWS does not support this natively.  
You **CAN** integrate this with 3rd party tools like [CodeMagic](https://codemagic.io/apps), but natively there is no option on AWS to publish your application.

## Wrap up

This concludes the wish list that I have today for the existing AWS CI/CD tools.  
  
**Did I miss anything that you believe should be added?**  

Use the comments to give feedback or reach out to me on [LinkedIn](https://www.linkedin.com/in/johannes-koch-353b2158) or by [E-Mail](mailto:lockhead@lockhead.info)!