AWS Code Pipeline CI/CD
Last updated
Last updated
AWS codePipeline is a fast reliable application release ,update automation service provided by Amazon Web Services for model and visualize your software release process. It provides build, test and deploy every time there is a code change within minimum downtime. It has capability of integration with other third party tool as well.
For an example you can directly deploy your code from a source repository such as GitHub, Bitbucket to AWS lamda or AWS EC2. And also AWS codePipeline provides you to build your code with third party tools such as Jenkins, AWS CodeCommit and integration test as well before you deploy your code.
AWS codePipeline supports below tools,
Source Code Repositories : GitHub, Amazon S3 (Versioned), AWS CodeCommit
Build Providers : Jenkins, AWS CodeBuild, Solano CI
Deployment Tools : AWS Elastic Beanstalk, AWS CodeDeploy, AWS CloudFormation
Below diagram shows overall architecture of deployment with codePipeline.
Benefits of automating deployment with codePipeline
Improve Developer Productivity
Continuous integration with aws codePipeline helps your team be more productive by freeing developers from manual tasks and encouraging behaviors that help reduce the number of errors and bugs released to customers.
2. Find and Address Bugs Quicker
With frequent testing, your team can discover and address bugs earlier before they grow into larger problems later.
3. Deliver Updates Faster
AWS codePipeline helps your team deliver updates to their customers faster and more frequently.
4. Provides notification on pipeline changes
You can get notified whenever there is a pipeline, stage, or action status change in AWS CodePipeline. This makes it easy for you to track, manage, and react to any changes during a pipeline execution.You can integrate AWS codePipeline with AWS Cloud Watch and enables you to receive notifications with AWS simple notification system (SNS).
5. Approval actions for codePipeline
In AWS CodePipeline, you can add an approval action to a stage in a pipeline at the point where you want the pipeline execution to stop so that someone with the required AWS Identity and Access Management permissions can approve or reject the action.
If the action is approved, the pipeline execution resumes. If the action is rejected — or if no one approves or rejects the action within seven days of the pipeline reaching the action and stopping — the result is the same as an action failing, and the pipeline execution does not continue.
6. Centralized auditing
Developers can log CodePipeline API calls with AWS cloudTrial for security and operational troubleshooting.
7. Low cost
Active pipeline only $1 per month if there is at least one code change throughout the course of the month that flows through the pipeline. If not, there is no charge.
How AWS codePipeline works
Following diagram describes different stages in codePipeline.
Action
A single unit of execution. It can be a code build, test suite, run or deployment process. We can add other AWS services and an action. In this architecture, we added the AWS code build and AWS cloud formation templates as actions. Actions can be executed sequentially (one after the other) or parallelly.
Stage
A collection of actions. It can be considered as one level of a continuous deployment process. In your’e pipeline, you have a source stage which is responsible for triggering the pipeline when there is a source repository change, and to get all necessary resources for the code build stage. The Build stage is responsible for building the project, running tests, verifying the code and producing a deployable artifact which can be used in the deployment stage.
The deployment stage is responsible for deploying the artifact produced by the build stage in different environments. All the transaction between stages take place when all the actions in the first stage are successful.
Limits in AWS CodePipeline
Number of stages in a pipeline is minimum 2 and maximum 10.
2. Number of actions in a pipeline is minimum 1 and maximum 20.
3. Following regions you can create AWS codePipelins,
US East (Ohio) (us-east-2), US East (N. Virginia) (us-east-1), US West (N. California) (us-west-1), US West (Oregon) (us-west-2), Canada (Central) (ca-central-1), EU (Ireland) (eu-west-1), EU (London) (eu-west-2), EU (Paris) (eu-west-3), EU (Frankfurt) (eu-central-1), Asia Pacific (Mumbai) (ap-south-1), Asia Pacific (Tokyo) (ap-northeast-1), Asia Pacific (Seoul) (ap-northeast-2), Asia Pacific (Singapore) (ap-southeast-1), Asia Pacific (Sydney) (ap-southeast-2), South America (São Paulo) (sa-east-1)
4. Maximum number of pipelines per region in an AWS account,
US East (N. Virginia) (us-east-1): 40
US West (Oregon) (us-west-2): 60
EU (Ireland) (eu-west-1): 60
All other supported regions: 20
In summary, AWS codePipeline makes easy to manage Life cycle of application development. In my next blog I will explain step by step guidance for configuring codePipeline.