Ticker

6/recent/ticker-posts

Continuous Delivery of CDK Applications on AWS through CDK Pipelines

The AWS Cloud Development Kit (CDK) is an open-source software development framework to describe cloud infrastructure in familiar programming languages and provision it through AWS Cloud Formation. The AWS CDK consists of three main components: 

  • A CLI to deploy CDK applications

  • The core Framework for modeling implementation of reusable infrastructure components.

  • The AWS Construct Library, which is a set of high-level components that abstract cloud resources and encapsulate proven defaults.



Continuous Delivery of CDK Applications on AWS through CDK Pipelines


It is always possible to configure your preferred CI/CD system to deploy CDK applications continuously, but customers may want it in a more easy way. It makes perfect sense as one of the core tenets of the CDK has always been to simplify cloud application development through the AWS Developer as much as possible so that you can focus on the parts that could be relevant to you. 

CDK Pipelines is a high-level construct library which will make easy to set up a continuous deployment pipeline for the CDK application, powered by AWS Code Pipeline. Here, we will discuss on how to use CDK Pipelines to deploy an AWS Lambda.

| Why should a person learn about AWS?

What are CDK Pipelines?

CDK Pipeline is a construct library that has a little higher level and opinionated than the one you find in the AWS Construct library. It will make some choices for you but you can provide less effort of using this.

The most vital construct in the library is CDK Pipeline that will configure a Code pipeline for you to deploy your CDK application. A pipeline can consist of several stages to represent the logical phases of the deployment. Each stage contains one or more actions that will define what to do in a particular stage. A CDK pipeline can start with several predefined stages as well as actions, but you can add the actions and the stages to it to suit the requirements of the application.

The pipeline created by CDK pipelines is self-mutating which means you just need to run CDK Deploy one time to start the pipeline. After that, the pipeline will automatically update itself if you add any new CDK applications or stages in the source code.

The below diagram elaborates the stages of the CDK Pipeline:

Source -> Build -> UpdatePipeline - > PublishAssets - > Stage 1 - > Stage 2 …..


Source: It is most probably the familiar stage. It fetches the source of the CDK app from your forked GitHub repo and triggers the pipeline every time you push new commits to it.

Build: This stage compiles your code where necessary and performs a CDK synth. The output of that step is a cloud assembly which is used to execute all actions in the rest of the pipeline.

UpdatePipeline: This stage modifies the pipeline if required. Like as an example, if you update your code to add a new deployment stage to the pipeline or add a new asset to the application, the pipeline will then automatically updated to reflect the changes you made. 

PublishAssets: In this stage, preparation of the file assets has been made which will then publishes that you are using in your app to Amazon Simple Storage Service (Amazon S3) and all Docker images to Amazon Elastic Container Registry (Amazon ECR) in every account and Region from which it is consumed so that they can be used during the subsequent deployments.

All following stages organize your CDK application to the account and Region you specify in your source code. The combination of account and region that you want to organize has to be bootstrapped first, which means some negligible infrastructure is stipulating into the account so that the CDK can access it. You also have to add a relationship trust to the account that contains the pipeline. So, all you can do after getting proper AWS online training from a reputed institution will ultimately make you capable of the practical dealing of the CDK pipeline.

| Why has AWS cloud practitioner training become famous?

|



Azure Training Map

Post a Comment

0 Comments