<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sreeraju V on Medium]]></title>
        <description><![CDATA[Stories by Sreeraju V on Medium]]></description>
        <link>https://medium.com/@coder.sreeraj?source=rss-c77570a43325------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JgTqca9086Jc3o0mlv2EWg.jpeg</url>
            <title>Stories by Sreeraju V on Medium</title>
            <link>https://medium.com/@coder.sreeraj?source=rss-c77570a43325------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 01:55:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@coder.sreeraj/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 5)]]></title>
            <link>https://medium.com/@coder.sreeraj/continuous-deployment-using-aws-code-commit-aws-code-deploy-and-jenkins-part-5-c12870c034df?source=rss-c77570a43325------2</link>
            <guid isPermaLink="false">https://medium.com/p/c12870c034df</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[codedeploy]]></category>
            <dc:creator><![CDATA[Sreeraju V]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 13:11:17 GMT</pubDate>
            <atom:updated>2019-03-05T06:25:12.401Z</atom:updated>
            <content:encoded><![CDATA[<h3>Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 5)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*7366z_JXSxGL3DcusyKZ5g.jpeg" /></figure><p><strong>Create a source bundle, which includes the deployment scripts, and upload it to AWS CodeCommit repository</strong></p><p>Now you can download the following sample bundle to your local repository and push the change to the central repository along with your application code hosted on AWS CodeCommit. The sample bundle includes everything you need to work AWS CodeDeploy: the Application Specification (AppSpec) file and deployment scripts.</p><p><a href="http://s3.amazonaws.com/aws-codedeploy-us-east-1/samples/latest/SampleApp_ELB_Integration.zip">http://s3.amazonaws.com/aws-codedeploy-us-east-1/samples/latest/SampleApp_ELB_Integration.zip</a></p><p>This sample bundle contains the deployment artifacts and a set of scripts that call the AutoScaling EnterStandby and ExitStandby APIs to do both the registration and deregistration of an Amazon EC2 instance from the load balancer.</p><p>The installation scripts and deployment artifacts are bundled together with a CodeDeploy AppSpec file. The AppSpec file must be placed in the root of your sourcerepository and describes where to copy the application and how to execute installation scripts.</p><p>Simply set the name (or names) of the Elastic Load Balancer your instances are a part of, set the scripts in the appropriate lifecycle events, and the scripts will take care of deregistering the instance, waiting for connection draining, and re-registering after the deployment finishes.</p><p>Requirements</p><p>The register and deregister scripts have a couple of dependencies in order to properly interact with Elastic Load Balancing and AutoScaling:</p><ul><li>The AWS CLI. In order to take advantage of AutoScaling’s Standby feature, the CLI must be at least version 1.3.25. If you have Python and PIP already installed, the CLI can simply be installed with pip install awscli</li><li>An instance profile with a policy that allows, at minimum, the following actions:</li></ul><pre>elasticloadbalancing:Describe*<br>elasticloadbalancing:DeregisterInstancesFromLoadBalancer<br>elasticloadbalancing:RegisterInstancesWithLoadBalancer<br>autoscaling:Describe*<br>autoscaling:EnterStandby<br>autoscaling:ExitStandby<br>autoscaling:UpdateAutoScalingGroup<br>autoscaling:SuspendProcesses<br>autoscaling:ResumeProcesses</pre><ul><li>All instances are assumed to already have the AWS CodeDeploy Agent installed.</li></ul><p><strong>Installing the Scripts</strong></p><p>To use these scripts in your application follow the steps:</p><ol><li>Install the AWS CLI on all your instances.</li><li>Update the policies on the EC2 instance profile to allow the above actions.</li><li>Copy the .sh files in this directory into your application source.</li><li>Edit your application’s appspec.yml to run deregister_from_elb.sh on the ApplicationStop event, andregister_with_elb.sh on the ApplicationStart event.</li><li>If your instance is not in an Auto Scaling Group, edit common_functions.sh to set ELB_LIST to contain the name(s) of the Elastic Load Balancer(s) your deployment group is a part of. Make sure the entries in ELB_LIST are separated by space. Alternatively, you can set ELB_LIST to _all_ to automatically use all load balancers the instance is registered to, or_any_ to get the same behaviour as _all_ but without failing your deployments if the instance is not part of any ASG or ELB. This is more flexible in heterogeneous tag-based Deployment Groups.</li><li>Optionally set up HANDLE_PROCS=true in common_functions.sh</li></ol><p>Here is the appspec.yml file from the sample artifact bundle:</p><pre>version: 0.0<br>os: linux<br>files:<br>  - source: /html<br>    destination: /var/www/html<br> overwrite: yes/skip/fail<br>hooks:<br>  BeforeInstall:<br> - location: scripts/remove.sh<br> ApplicationStop:<br>    - location: scripts/deregister_from_elb.sh<br>      timeout: 400<br>    - location: scripts/stop_server.sh<br>      timeout: 120<br>      runas: root<br>  ApplicationStart:<br>    - location: scripts/start_server.sh<br>      timeout: 120<br>      runas: root<br>    - location: scripts/register_with_elb.sh<br>      timeout: 120</pre><p>The defined commands in the <strong>AppSepc</strong> file will be executed in the following order (see AWS CodeDeploy AppSpec File Reference for more details):</p><p><strong>BeforeInstall deployment lifecycle event</strong>: First, the remove.sh scripts remove the all content from /var/www/html folder</p><p><strong>ApplicationStop deployment lifecycle event</strong>: deregisters the instance from the load balancer (deregister_from_elb.sh). you need to increased the time out for the deregistration script above the 300 seconds that the load balancer waits until all connections are closed, which is the default value if connection draining is enabled. After that it stops the Apache Web Server (stop_server.sh).</p><p><strong>Install deployment lifecycle event</strong>: The next step of the host agent is to copy the HTML pages defined in the ‘files’ section from the ‘/html’ folder in the archive to ‘/var/www/html’ on the server.</p><p><strong>ApplicationStart deployment lifecycle event</strong>: It starts the Apache Web Server (start_server.sh). It then registers the instance with the load balancer (register_with_elb.sh).</p><p>If you do the deployment for the first time with AWS CodeDeploy, the instance would not get deregistered from the load balancer. In this case you need to skip the BeforeInstall deployment lifecycle event. We need to use BeforeInstall instead of the ApplicationStop deployment lifecycle event; the ApplicationStop event always executes the scripts from the previous deployment bundle.</p><p><strong>Step by step process of the scripts</strong></p><ol><li>The script gets the instance ID (and AWS region) from the Amazon EC2 metadata service.</li><li>It checks if the instance is part of an Auto Scaling group.</li><li>After that the script deregisters the instance from the load balancer by putting the instance into standby mode in the Auto Scaling group.</li><li>The script keeps polling the Auto Scaling API every second until the instance is in standby mode, which means it has been deregistered from the load balancer.</li><li>The deregistration might take a while if connection draining is enabled. The server has to finish processing the ongoing requests first before we can continue with the deployment.</li></ol><p><strong>Update the Local Git Repository</strong></p><p>Now that your development environment is configured and the Jenkins server is set up, modify the source in your local repository with AWS CodeDeploy scripts and push the change to the central repository hosted on AWS CodeCommit</p><p><strong>Monitor Build</strong></p><p>Within two minutes of pushing updates, a new build with a Build ID (for example, #2 or #3) should appear in the build history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o4cSJ4dUCa-GYnao.jpg" /></figure><p>Choose <strong>Git Polling Log</strong> to see the results of polling git for updates. There may be a few failed polls from earlier when the repository was empty</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*00Sae-5rZvikcRi7.png" /></figure><p>Choose the most recent build. On the Build details page, choose <strong>Console Output</strong>to view output from the build</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iWtWAwxQjQpBEUgK.jpg" /></figure><p>At the bottom of the output, check that the status of the build is <strong>SUCCESS</strong></p><p>Let’s move In the CodeDeploy console, choose <strong>AWS CodeDeploy</strong>, and then choose <strong>Deployments</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*zS72_NuFgVQPuVTo.png" /></figure><p>You have now successfully set up the CodeDeploy Jenkins plugin and used it to automatically deploy a revision to CodeDeploy when code updates are pushed to AWS CodeCommit. You can experiment by committing more changes to the code and then pushing them to deploy the updates automatically.</p><p><strong>Important notice about handling AutoScaling processes</strong></p><p>When using AutoScaling with CodeDeploy you have to consider some edge cases during the deployment time window:</p><ol><li>If you have a scale up event, the new instance(s) will get the latest successful Revision, and not the one you are currently deploying. You will end up with a fleet of mixed revisions.</li><li>If you have a scale down event, instances are going to be terminated, and your deployment will (probably) fail.</li><li>If your instances are not balanced accross Availability Zones and you are using these scripts, AutoScaling may terminate some instances or create new ones to maintain balance (see <a href="http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html#process-types">this doc</a>), interfering with your deployment.</li><li>If you have the health checks of your AutoScaling Group based off the <a href="http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html">ELB’s</a>and you are not using these scripts, then instances will be marked as unhealthy and terminated, interfering with your deployment.</li></ol><p>There are a few other points to consider in order to achieve zero-downtime deployments:</p><p><strong>Graceful shut-down of your application</strong>: You do not want to kill a process with running executions. Make sure that the running threads have enough time to finish work before shutting down your application.</p><p><strong>Connection draining</strong>: The AWS CloudFormation template sets up an Elastic Load Balancing load balancer with connection draining enabled. The load balancer does not send any new requests to the instance when the instance is deregistering, and it waits until any in-flight requests have finished executing. (For more information, see <a href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/config-conn-drain.html">Enable or Disable Connection Draining for Your Load Balancer</a>.)</p><p><strong>Sanity test</strong>: It is important to check that the instance is healthy and the application is running before the instance is added back to the load balancer after the deployment.</p><p><strong>Backward-compatible changes</strong>: (for example, database changes) Both application versions must work side by side until the deployment finishes, because only a part of the fleet is updated at the same time.</p><p><strong>Warming of the caches and service</strong>: This is so that no request suffers a degraded performance after the deployment.</p><p><strong>WARNING</strong>: If you are using this functionality you should only use <em>CodeDepoyDefault.OneAtATime</em> deployment configuration to ensure a serial execution of the scripts. Concurrent runs are not supported.</p><p>This example should help you get started toward improving your deployment process. I hope that this post makes it easier to reach zero-downtime deployments with AWS CodeDeploy and allows shipping your changes continuously in order to provide a great experience.</p><p><strong>Reference:</strong></p><p><a href="https://aws.amazon.com/">https://aws.amazon.com/</a></p><p><a href="https://github.com/">https://github.com</a></p><p><a href="https://blogs.aws.amazon.com/">https://blogs.aws.amazon.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c12870c034df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 4)]]></title>
            <link>https://medium.com/@coder.sreeraj/continuous-deployment-using-aws-code-commit-aws-code-deploy-and-jenkins-part-4-82dadeceffe9?source=rss-c77570a43325------2</link>
            <guid isPermaLink="false">https://medium.com/p/82dadeceffe9</guid>
            <category><![CDATA[aws-codedeploy]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sreeraju V]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 13:08:32 GMT</pubDate>
            <atom:updated>2019-03-05T06:19:07.184Z</atom:updated>
            <content:encoded><![CDATA[<h3>Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 4)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*7366z_JXSxGL3DcusyKZ5g.jpeg" /></figure><p><strong>Use AWS CodeDeploy to Deploy Amazon EC2 Instances Behind an Elastic Load Balancer and Auto Scaling</strong></p><p>Let’s assume you have an application architecture designed for high availability that includes an Elastic Load Balancer in front of multiple application servers belonging to an Auto Scaling Group. Elastic Load Balancing enables you to distribute incoming traffic over multiple servers and Auto Scaling allows you to scale your EC2 capacity up or down automatically according to your needs In this blog post, we will show how you can use CodeDeploy to avoid downtime when updating the code running on your application servers in such an environment. We will use the CodeDeploy rolling updates feature so that there is a minimum capacity always available to serve traffic and use a simple script to take EC2 instances out of the load balancer as and when we deploy new code on it.</p><p>So let’s get started. We are going to:</p><ul><li>Set up the environment with Elastic Load Balancer and Auto Scaling Group</li><li>Set up the Jenkins to pull the latest Code from AWS CodeCommit Repo</li><li>Build a application bundle, which includes the deployment scripts, and upload it to Amazon S3</li><li>Create an AWS CodeDeploy application and a deployment group</li><li>AWS Code Deploy will pull the zip file in all the Auto Scaled Instance</li><li>Start the zero-downtime deployment</li><li>Monitor your deployment</li></ul><p><strong>Set up the AWS environment</strong></p><p>You can skip this step if already you have a AWS infrastructure that have Elastic Load Balancer and Auto Scaling Group configured.</p><p>Let’s get started by setting up some AWS resources</p><p>To simplify the setup process, you can use a sample AWS CloudFormation template that sets up the following resources for you:</p><ol><li>An Auto Scaling group and its launch configuration. The Auto Scaling group launches by default three Amazon EC2 instances. The AWS CloudFormation template installs Apache on each of these instances to run a sample website. It also installs the AWS CodeDeploy Agent, which performs the deployments on the instance. The template creates a service role that grants AWS CodeDeploy access to add deployment lifecycle event hooks to your Auto Scaling group so that it can kick off a deployment whenever Auto Scaling launches a new Amazon EC2 instance.</li><li>The Auto Scaling group spins up Amazon EC2 instances and monitors their health . The Auto Scaling Group spans all Availability Zones within the region for fault tolerance.</li><li>An Elastic Load Balancing load balancer, which distributes the traffic across all of the Amazon EC2 instances in the Auto Scaling group</li></ol><p>Simply execute the following command using the AWS Command Line Interface (AWS CLI), or you can create an AWS CloudFormation stack with the AWS Management Console by using the value of the –template-url option shown here:</p><pre>aws cloudformation create-stack \<br> --stack-name &quot;CodeDeploySampleELBIntegrationStack&quot; \<br> --template-url &quot;http://s3.amazonaws.com/aws-codedeploy-us-east-1/templates/latest/CodeDeploy_SampleCF_ELB_Integration.json&quot; \<br> --capabilities &quot;CAPABILITY_IAM&quot; \<br> --parameters &quot;ParameterKey=KeyName,ParameterValue=&lt;my-key-pair&gt;&quot;</pre><pre>Note: AWS CloudFormation will change your AWS account’s security configuration by adding two roles. These roles will enable AWS CodeDeploy to perform actions on your AWS account’s behalf. These actions include identifying Amazon EC2 instances by their tags or Auto Scaling group names and for deploying applications from Amazon S3 buckets to instances. For more information, see the AWS CodeDeploy service role and IAM instance profile documentation.</pre><p><strong>Create AWS CodeDeploy Application</strong></p><p>AWS CodeDeploy is a flexible and reliable deployment configuration and management system that enables you to deploy and update applications running on instances while avoiding downtime. You can view, create, and diagnose applications. Select an application to view details and deploy your application to instances.</p><p>Go to AWS <strong>CodeDeploy -&gt; Get Started -&gt; Custom Deployment </strong>This will bring you to <strong>Create New Application</strong> page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/0*HGfA3IdntxQexGal.png" /></figure><p>Fill in the Application Name and Deployment Group Name</p><p>The next part is selecting the instances where you want to deploy the application. An Auto Scaling group of EC2 instances running with Apache and the CodeDeploy agent are installed and fronted by an Elastic Load Balancing. In Add Instances part you can search and select your Instances or AutoScaling Group by tag names.</p><p>Here we select the instance that we had launched.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*GGiI9kpMLOmsKDP5.png" /></figure><p><strong>Deployment Configuration</strong></p><p>Choose from a list of default and custom deployment configurations. A deployment configuration is a set of rules that determines how fast an application will be deployed and the success or failure conditions for a deployment.<br><strong>Deployment Config</strong> , here we can set it to <em>CodeDeployDefault.OneAtATime</em>.</p><p><strong>Service Role</strong> , here we attach the role <strong>CodeDeploy</strong> that we had created.</p><p>Finally select <strong>Create Application</strong>. Here we finish with configuring AWS CodeDeploy</p><p>Now next part would be to configure Jenkins.</p><p><strong>Create a Project and Configure the CodeDeploy Jenkins Plugin</strong></p><p>Now we’ll create a project in Jenkins and configure the Jenkins plugin to poll for code updates from the AWS CodeCommit repository.</p><p>Create a freestyle project by clicking <strong>New Item</strong> option</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/0*GlgnkZCib2qKyGbW.png" /></figure><p>On the project configuration page, under Source Code Management, choose Git. Paste the URL you noted when you created the AWS CodeCommit repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*AoXNiQTS7N0LJuL9.png" /></figure><p>In Build Triggers, select the Poll SCM check box. In the Schedule text field, type H/2 * * * *. This tells Jenkins to poll CodeCommit every two minutes for updates. (This may be too frequent for production use, but it works well for testing because it returns results frequently.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*EsL4nYKs4dvwFp9F.png" /></figure><p>Under Post-build Actions, choose Add post-build actions, and then select the Deploy an application to AWS CodeDeploy check box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/0*M2kqleuV9MaV39IG.png" /></figure><p>Choose Use temporary credentials, and then paste the value of CodeDeployRoleArn that we noted before</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*tIUiFPu8-Lxx5brw.png" /></figure><p>Or you can use your IAM User Access Keys and Secret keys</p><pre>Note the External ID field displayed on this page. This is a unique random ID generated by the CodeDeploy Jenkins plugin. This ID can be used to add a condition to the IAM role to ensure that only the plugin can assume this role. To keep things simple, we will not use the External ID as a condition, but we strongly recommend you use it for added protection in a production scenario, especially when you are using cross-account IAM roles.</pre><p>Choose <strong>Test Connection</strong>. Confirm the text “Connection test passed” appears, and then choose Save to save your settings</p><p>Next to create an Application bundle, which includes the deployment scripts, and upload it to Amazon S3</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82dadeceffe9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 3)]]></title>
            <link>https://medium.com/@coder.sreeraj/continuous-deployment-using-aws-code-commit-aws-code-deploy-and-jenkins-part-3-bc40486f0722?source=rss-c77570a43325------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc40486f0722</guid>
            <category><![CDATA[aws-codedeploy]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <dc:creator><![CDATA[Sreeraju V]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 13:06:53 GMT</pubDate>
            <atom:updated>2019-03-05T06:26:01.287Z</atom:updated>
            <content:encoded><![CDATA[<h3>Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 3)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*7366z_JXSxGL3DcusyKZ5g.jpeg" /></figure><p><strong>AWS CodeDeploy :</strong></p><p>AWS CodeDeploy coordinates application deployments to Amazon EC2 instances, on-premises instances, or both. (On-premises instances are physical devices that are not Amazon EC2 instances.)</p><p>An application can contain deployable content like code, web, and configuration files, executables, packages, scripts, and so on. AWS CodeDeploy deploys applications from Amazon S3 buckets and GitHub repositories.</p><p>You do not need to make changes to your existing code to use AWS CodeDeploy. You can use AWS CodeDeploy to control the pace of deployment across Amazon EC2 instances and to define the actions to be taken at each stage. AWS CodeDeploy works with various systems for configuration management, source control, continuous integration, continuous delivery, and continuous deployment.</p><p>AWS CodeDeploy offers these benefits:</p><p><strong>Automated deployments</strong>: AWS CodeDeploy fully automates your application deployments across your development, test, and production environments. AWS CodeDeploy scales with your infrastructure so that you can deploy to one instance or thousands.</p><p><strong>Minimize downtime</strong>: AWS CodeDeploy helps maximize your application availability by performing rolling updates across your Amazon EC2 instances and tracking application health according to rules you configure. You can stop and roll back deployments if there are errors.</p><p><strong>Centralized control</strong>: You can launch and track the status of your deployments through the AWS CodeDeploy console or the AWS CLI. You will receive a report that lists when each application revision was deployed and to which Amazon EC2 instances.</p><p><strong>Easy to adopt</strong>: AWS CodeDeploy is platform-agnostic and works with any application. You can easily reuse your setup code. AWS CodeDeploy can also integrate with your software release process or continuous delivery tool-chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*bgf-aew0nXk-PhZr.png" /></figure><p>Here’s how it works:</p><p>1. First, you create deployable content on your local development machine or similar environment, and then you add an application specification file (AppSpec file). The AppSpec file is unique to AWS CodeDeploy; it defines the deployment actions you want AWS CodeDeploy to execute. You bundle your deployable content and the AppSpec file into an archive file, and then upload it to an Amazon S3 bucket or a GitHub repository. This archive file is called an application revision (or simply a revision).</p><p>2. Next, you provide AWS CodeDeploy with information about your deployment, such as which Amazon S3 bucket or GitHub repository to pull the revision from and which set of Amazon EC2 instances to deploy its contents to. AWS CodeDeploy calls a set of Amazon EC2 instances a deployment group. A deployment group contains individually tagged Amazon EC2 instances, Amazon EC2 instances in Auto Scaling groups, or both.</p><p>Each time you successfully upload a new application revision that you want to deploy to the deployment group, that bundle is set as the target revision for the deployment group. In other words, the application revision that is currently targeted for deployment is the target revision. This is also the revision that will be pulled for automatic deployments.</p><p>3. Next, the AWS CodeDeploy agent on each instance polls AWS CodeDeploy to determine what and when to pull from the specified Amazon S3 bucket or GitHub repository.</p><p>4. Finally, the AWS CodeDeploy agent on each instance pulls the target revision from the specified Amazon S3 bucket or GitHub repository and, using the instructions in the AppSpec file, deploys the contents to the instance.</p><p>AWS CodeDeploy keeps a record of your deployments so that you can get information such as deployment status, deployment configuration parameters, instance health, and so on</p><p>AWS CodeDeploy requires the following for each instance that it deploys to.</p><ol><li>Each Amazon EC2 instance must launch with the correct IAM instance profile attached.</li><li>Each Amazon EC2 instance must have identifying Amazon EC2 tags or be in an Auto Scaling group.</li><li>Each on-premises instance must have an associated IAM user, identifying on-premises instance tags, and a special configuration file.</li><li>The AWS CodeDeploy agent must be installed and running on each instance</li></ol><p><strong>Provision an IAM User</strong></p><p>Follow these instructions to prepare an IAM user to use AWS CodeDeploy:</p><p>Use the previously created IAM user access to AWS CodeDeploy — and AWS services and actions AWS CodeDeploy depends on — by attaching the following policy to the existing IAM user:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot; : [<br>    {<br>      &quot;Effect&quot; : &quot;Allow&quot;,<br>      &quot;Action&quot; : [<br>        &quot;autoscaling:*&quot;,<br>        &quot;codedeploy:*&quot;,<br>        &quot;ec2:*&quot;,<br>        &quot;elasticloadbalancing:*&quot;,<br>        &quot;iam:AddRoleToInstanceProfile&quot;,<br>        &quot;iam:CreateInstanceProfile&quot;,<br>        &quot;iam:CreateRole&quot;,<br>        &quot;iam:DeleteInstanceProfile&quot;,<br>        &quot;iam:DeleteRole&quot;,<br>        &quot;iam:DeleteRolePolicy&quot;,<br>        &quot;iam:GetInstanceProfile&quot;,<br>        &quot;iam:GetRole&quot;,<br>        &quot;iam:GetRolePolicy&quot;,<br>        &quot;iam:ListInstanceProfilesForRole&quot;,<br>        &quot;iam:ListRolePolicies&quot;,<br>        &quot;iam:ListRoles&quot;,<br>        &quot;iam:PassRole&quot;,<br>        &quot;iam:PutRolePolicy&quot;,<br>        &quot;iam:RemoveRoleFromInstanceProfile&quot;,<br>        &quot;s3:*&quot;<br>      ],<br>      &quot;Resource&quot; : &quot;*&quot;<br>    }   <br>  ]<br>}</pre><p><strong>Create a Service Role for AWS CodeDeploy</strong></p><p>We need to configure two IAM Roles that would be used to boot the EC2 server / access S3 and then for Code Deploy to talk to EC2 server, S3, Elastic Load Balancing and Auto Scaling .</p><p>In AWS, service roles are used to grant permissions to an AWS service, so it can access AWS resources. The policies that you attach to the service role determine which AWS resources the service can access and what it can do with those resources.<br>The service role you create for AWS CodeDeploy must be granted the permissions to access the instances to which you will deploy applications. These permissions enable AWS CodeDeploy to read the tags applied to the instances or the Auto Scaling group names associated with the instances.</p><p>The permissions you add to the service role specify the operations AWS CodeDeploy can perform when it accesses your Amazon EC2 instances and Auto Scaling groups. To add these permissions, attach an AWS-supplied policy, AWSCodeDeployRole, to the service role.</p><p>As part of setting up the service role, you also update its trust relationship to specify the endpoints to which you want to grant it access.</p><p><strong>Create a Service Role (Console)</strong></p><ul><li>Loign in to the Identity and Access Management (IAM) console</li><li>In the <strong>Role</strong> Name box, give the service role a name (for example, <strong>CodeDeployRole</strong>), and then choose Next Step.</li><li>On the Select Role Type page, with AWS Service Roles selected, next to AWS CodeDeploy, choose Select.</li></ul><p>On the Attach Policy page, select the box next to the <strong>AWSCodeDeployRole</strong>policy, and then choose Next Step.</p><p>The<strong> AWSCodeDeployRole</strong> policy provides the permissions required for your service role to read the tags on your instances or identify your Amazon EC2 instances by Auto Scaling group names. By default, this policy also includes a trust relationship that grants your service role access to all of the endpoints currently supported by AWS CodeDeploy.</p><p>You can restrict the service role’s access to only those endpoints you specify.</p><p>Note the value of the <strong>Role ARN</strong> field. You will need it later when you create deployment groups. If you forget the value, follow the instructions in Get the Service Role ARN (Console) .</p><p>Choose <strong>Create Role</strong>.</p><p>If you want this service role to have permission to access all currently supported endpoints, you are finished with this procedure. If you want to restrict this service role from accessing all endpoints, in the list of roles, browse to and choose the role you just created, and continue with the next step.</p><p>Under <strong>Trust Relationships</strong>, choose Edit<strong> Trust Relationship</strong>.</p><p>You should see the following policy, which provides the service role permission to access all supported endpoints:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Sid&quot;: &quot;&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: {<br>        &quot;Service&quot;: [<br>          &quot;codedeploy.amazonaws.com&quot;<br>        ]<br>      },<br>         &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br>    }<br>  ]<br>}</pre><p>To grant the service role access to only some supported endpoints, replace the contents of the Policy Document box with the following policy, remove the lines for the endpoints to which you want to exclude access, and then choose <strong>Update Trust Policy</strong>.</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>      {<br>        &quot;Sid&quot;: &quot;&quot;,<br>        &quot;Effect&quot;: &quot;Allow&quot;,<br>        &quot;Principal&quot;: {<br>           &quot;Service&quot;: [<br>             &quot;codedeploy.us-east-1.amazonaws.com&quot;, <br>             &quot;codedeploy.us-west-1.amazonaws.com&quot;,<br>             &quot;codedeploy.us-west-2.amazonaws.com&quot;,<br>             &quot;codedeploy.ap-northeast-1.amazonaws.com&quot;,<br>             &quot;codedeploy.ap-northeast-2.amazonaws.com&quot;,<br>             &quot;codedeploy.ap-south-1.amazonaws.com&quot;,<br>             &quot;codedeploy.ap-southeast-1.amazonaws.com&quot;,<br>             &quot;codedeploy.ap-southeast-2.amazonaws.com&quot;,<br>             &quot;codedeploy.eu-central-1.amazonaws.com&quot;,<br>             &quot;codedeploy.eu-west-1.amazonaws.com&quot;,<br>             &quot;codedeploy.sa-east-1.amazonaws.com&quot;<br>            ]<br>          },<br>      &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br>       }<br>     ]<br>   }</pre><p><strong>Get the Service Role ARN (Console)</strong></p><p>To use the IAM console to get the ARN of the service role:</p><ol><li>Sign in to the Identity and Access Management (IAM) console</li><li>In the navigation pane, choose Roles.</li><li>In the Search box, type CodeDeployRole, and then press Enter.</li><li>Choose CodeDeployRole.</li><li>Note the value of the Role ARN field.</li></ol><p><strong>Create an IAM Instance Profile for Your Amazon EC2 Instances</strong></p><p>Your Amazon EC2 instances need permission to access the Amazon S3 buckets or GitHub repositories where the applications that will be deployed by AWS CodeDeploy are stored. To launch Amazon EC2 instances that are compatible with AWS CodeDeploy, you must create an additional IAM role, an instance profile. These instructions show you how to create an IAM instance profile to attach to your Amazon EC2 instances. This role gives AWS CodeDeploy permission to access the Amazon S3 buckets or GitHub repositories where your applications are stored.</p><p><strong>Create an IAM Instance Profile for Your Amazon EC2 Instances</strong></p><ol><li>Sign in to the Identity and Access Management (IAM) console</li><li>In the IAM console, in the navigation pane, choose Policies, and then choose Create Policy. (If a Get Started button appears, choose it, and then choose Create Policy.)</li><li>Next to Create Your Own Policy, choose Select.</li><li>In the Policy Name box, type InstanceRole.</li><li>In the Policy Document box, paste the following:</li></ol><pre>{<br>   &quot;Version&quot;: &quot;2012-10-17&quot;,<br>   &quot;Statement&quot;: [          {<br>            &quot;Resource&quot;: &quot;*&quot;,<br>            &quot;Action&quot;: [<br>                &quot;elasticloadbalancing:Describe*&quot;,<br>                &quot;elasticloadbalancing:DeregisterInstancesFromLoadBalancer&quot;,<br>                &quot;elasticloadbalancing:RegisterInstancesWithLoadBalancer&quot;,<br>                &quot;autoscaling:Describe*&quot;,<br>                &quot;autoscaling:EnterStandby&quot;,<br>                &quot;autoscaling:ExitStandby&quot;,<br>                &quot;autoscaling:UpdateAutoScalingGroup&quot;,<br>                &quot;autoscaling:Describe*&quot;,<br>                &quot;cloudformation:Describe*&quot;,<br>                &quot;cloudformation:GetTemplate&quot;,<br>                &quot;s3:Get*&quot;<br>            ],<br>            &quot;Effect&quot;: &quot;Allow&quot;<br>        }<br>    ]<br>}</pre><ol><li>Choose<strong>Create Policy</strong>.</li><li>In the navigation pane, choose<strong>Roles</strong>, and then choose <strong>Create New Role</strong>.</li><li>In the<strong>Role Name</strong> box, give the IAM instance profile a name <strong>CodeDeployInstance</strong> , and then choose <strong>Next Step</strong>.</li><li>On the<strong>Select Role Type</strong> page, next to <strong>Amazon EC2</strong>, choose <strong>Select</strong>.</li><li>On the<strong>Attach Policy</strong> page, select the box next to <strong>InstanceRole</strong>, and then choose <strong>Next Step</strong>.</li><li>Choose<strong>Create Role</strong>.</li></ol><p>This service role will give the access permission for EC2 server to access Amazon S3, AWS CloudFormation, Elastic Load Balancing and Auto Scaling services.</p><p>Now you need to launch a new Instance attached with IAM role CodeDeployInstance and install aws cli with aws code deploy agent.</p><p>To Install CodeDeploy agent follows below steps:</p><pre>aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1</pre><pre>chmod +x ./install<br>sed -i &quot;s/sleep(.*)/sleep(10)/&quot; install<br>./install auto<br>service codedeploy-agent status</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc40486f0722" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 2)]]></title>
            <link>https://medium.com/@coder.sreeraj/continuous-deployment-using-aws-code-commit-aws-code-deploy-and-jenkins-part-2-c977b8db3f1b?source=rss-c77570a43325------2</link>
            <guid isPermaLink="false">https://medium.com/p/c977b8db3f1b</guid>
            <category><![CDATA[aws-codedeploy]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sreeraju V]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 13:03:05 GMT</pubDate>
            <atom:updated>2019-03-05T06:26:08.973Z</atom:updated>
            <content:encoded><![CDATA[<h3>Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 2)</h3><h4>Jenkins Server</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*7366z_JXSxGL3DcusyKZ5g.jpeg" /></figure><p>Jenkins is an open source automation server. With Jenkins, organizations can accelerate the software development process through automation. Jenkins manages and controls development lifecycle processes of all kinds, including build, document, test, package, stage, deployment, static analysis and many more.</p><p>You can set up Jenkins to watch for any code changes in places like SVN and Git, automatically do a build with tools like Ant and Maven, initiate tests and then take actions like rolling back or rolling forward in production.</p><h4>Set Up the Jenkins Server</h4><p>Create an instance using the Amazon Linux AMI. Make sure you associate the instance with the <em>CodeCommitRole</em> role (Created in previous step) and configure the security group associated with the instance to allow incoming traffic on ports 22 (SSH) and 8080 (Jenkins). You may further secure your server by restricting access to only the IP addresses of local development environment connecting to Jenkins</p><p>Use SSH to connect to the instance. Update the AWS CLI and install Jenkins, Git, and the Java JDK.</p><pre>sudo yum install -y git java-1.8.0-openjdk-devel<br>sudo yum update -y aws-cli</pre><p>Add the Jenkins repository and install Jenkins.</p><pre>sudo wget -O /etc/yum.repos.d/jenkins.repo <a href="http://pkg.jenkins-ci.org/redhat/jenkins.repo">http://pkg.jenkins-ci.org/redhat/jenkins.repo</a><br>sudo rpm --import <a href="https://jenkins-ci.org/redhat/jenkins-ci.org.key">https://jenkins-ci.org/redhat/jenkins-ci.org.key</a><br>sudo yum install -y jenkins</pre><p><strong>Configure the AWS CLI on Jenkins Server</strong></p><pre>cd ~jenkins<br>sudo -u jenkins aws configure</pre><p>Accept the defaults for the AWS access key and AWS secret access key; enter <strong>us-east-1</strong> for the region name; and enter <strong>json</strong> for the output format.</p><pre>AWS Access Key ID [None]: Press Enter<br>AWS Secret Access Key [None]: Press Enter<br>Default region name [None]: Type us-east-1 here, and then press Enter<br>Default output format [None]: Type json here, and then press Enter</pre><p>Configure Git to use IAM credentials and an HTTP path to access the repositories hosted by AWS CodeCommit.</p><pre>sudo -u jenkins git config --global credential.helper &#39;!aws codecommit credential-helper $@&#39;<br>sudo -u jenkins git config --global credential.useHttpPath true<br>sudo -u jenkins git config --global user.email &quot;name@mycompany.com&quot;<br>sudo -u jenkins git config --global user.name &quot;MyJenkinsServer&quot;</pre><pre>Start Jenkins.</pre><pre>sudo service jenkins start<br>sudo chkconfig jenkins on</pre><p><strong>Configure Jenkins</strong></p><p>Once the installation is done open the Jenkins home page (http://&lt;public DNS name of EC2 instance&gt;:8080) in your browser. Well, the Jenkins is not secure now. To secure you can go to</p><p><strong>Manage Jenkins</strong> -&gt; <strong>Configure Global Security</strong> -&gt;<strong> </strong>tick <strong>Enable Security Under Security Realm</strong> -&gt; tick <strong>Jenkin’s own user database &amp; Under Authorization</strong> -&gt;<strong> </strong>tick <strong>Logged-in users can do anything</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qWH2AISI1c4lu5lJ.png" /></figure><p>This will take you to the signup page.</p><p>Since we are using GIT (AWS CodeCommit) as version control tool and AWS Code Deploy as Deployment tool, we need to install these plugins in Jenkins Manage Plugins option.</p><p>To install the plugin</p><p>Go to J<strong>enkins Manage Jenkins</strong> -&gt; <strong>Manage Plugins</strong></p><p>In the Available<strong> </strong>tab search and select Git Plugin and AWS CodeDeploy plugin. After selecting click Download and Install after restart.</p><p>This will download and install both the plugins and restart Jenkins .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6wy3NHQGI5BXUOmt.jpg" /></figure><p>After Jenkins has restarted, add a project that will execute a build each time a change is pushed to the AWS CodeCommit hosted repository. Before we need to configure AWS CodeDeploy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c977b8db3f1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 1)]]></title>
            <link>https://medium.com/@coder.sreeraj/continuous-deployment-using-aws-code-commit-aws-code-deploy-and-jenkins-part-1-2f0611572c6c?source=rss-c77570a43325------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f0611572c6c</guid>
            <category><![CDATA[aws-codedeploy]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-codecommit]]></category>
            <dc:creator><![CDATA[Sreeraju V]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 13:00:30 GMT</pubDate>
            <atom:updated>2019-03-05T06:25:48.857Z</atom:updated>
            <content:encoded><![CDATA[<h3>Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 1)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*7366z_JXSxGL3DcusyKZ5g.jpeg" /></figure><p>While we build scalable, highly available and fault tolerant systems on Amazon Web Services, it is important to look out AWS deployment tools which can handle system and application level deployment ensuring consistency, predictability and integrity across multiple environments. This leads to continuous and faster deployment, lower failure and error rates and quick recovery.</p><p><strong>Continuous Integration</strong> is a software development practice where continuous changes and updates in code base are integrated and verified by an automated build scripts using various tools.</p><p><strong>Continuous Deployment</strong> is also a software development practice whose role is to automatically deploy the code to the specified server and application folder once the code is been integrated successfully.</p><p><strong>Continuous Delivery</strong> is an end-to-end process for taking a functional requirement from concept to production as fast as is necessary to meet business needs. It depends on frequent deployments of small units of code rather than infrequent deployments of big releases. Successful continuous delivery also depends on DevOps — deep collaboration between development and operational IT functions</p><p>Here I ‘m going to describe about some AWS service and popular automation tool Jenkins to build a highly available, highly scalable, fault tolerant and zero down time deployment processes application infrastructure in AWS Cloud.</p><p>Scenario:</p><p>Suppose we have setup two different environments (Staging and Production) and the entire server are architecture on Amazon Web Services. And it was featured with AWS Auto Scaling service which used to help scale the servers depending on the metrics and policies we specified. And all your instances are behind a load balancer.</p><p>Requirements:</p><ul><li>Need to implement a tool for Continuous Integration.</li><li>Keep the downtime to bare minimum during releases process.</li><li>Ability to revert the changes from a particular developer with ease</li><li>Automatically deploy the latest code commits directly to staging servers.</li><li>After passing the QA process staging server move to production.</li></ul><p>Though the above challenges are not the blockers but we have to bring up a technique that must save high amount of time and make our life easy with automating all the process from CI to CD. We choose to use Jenkins as CI tool and AWS Code Deploy as a CD tool. This post walks you through the steps to set up CodeDeploy, Jenkins and AWS CodeCommit to support simple continuous integration (CI) and Continuous Delivery (CD) scenarios. AWS CodeDeploy deployments with instances that are behind an Elastic Load Balancer or in an Auto Scaling group.</p><p>In this scenario, the developer push the change to AWS CodeCommit hosted repository and have the change trigger a build in Jenkins. And deploy the code to servers by using AWS CodeDepoly. For the walkthrough, we will run the Jenkins server on an Amazon Linux Instance and configure the Git repository hosted by AWS CodeCommit.</p><p><strong>Step 1: Configure AWS CodeCommit Git repository</strong></p><p>AWS CodeCommit is a secure, highly scalable, managed source control service that hosts private Git repositories. AWS CodeCommit eliminates the need for you to manage your own source control system or worry about scaling its infrastructure. You can use AWS CodeCommit to store anything from code to binaries. It supports the standard functionality of Git, so it works seamlessly with your existing Git-based tools.</p><p><strong>Set Up IAM Permissions</strong></p><p>AWS CodeCommit uses IAM permissions to control access to the Git repositories.</p><p>Need to create an IAM user, an IAM role, and a managed policy. Then attach the managed policy to the IAM user and the IAM role, granting both the user and role the permissions to push and pull changes to and from the Git repository hosted by AWS CodeCommit. And then need to associate the IAM role with the Amazon EC2 instance you launch to run Jenkins. (Jenkins uses the permissions granted by the IAM role to access the Git repositories.)</p><p><strong>Creating IAM Users and Role for an AWS Service (AWS Management Console)</strong></p><ul><li>To create one or more IAM users with the AWS Management Console</li><li>Sign in to the Identity and Access Management (IAM) console at <a href="https://console.aws.amazon.com/iam/">https://console.aws.amazon.com/iam/.</a></li><li>In the navigation pane, choose Users and then choose Create New Users.</li><li>Create an IAM user. Save the access key ID and the secret access key for the new user.</li><li>Attach the managed policy named <em>AWSCodeCommitFullAccess</em> to the IAM user you created.</li><li>In the navigation pane of the IAM console, click Roles, and then click Create New Role.</li><li>Create an Amazon EC2 service role named <em>CodeCommitRole</em> and attach the managed policy (<em>AWSCodeCommitFullAccess</em>) to it.</li></ul><p><strong>Create an AWS CodeCommit Repository</strong></p><p>To create the AWS CodeCommit repository (console)</p><ul><li>Open the AWS CodeCommit console at <a href="https://console.aws.amazon.com/codecommit.">https://console.aws.amazon.com/codecommit.</a></li><li>On the welcome page, choose Get Started Now. (If a Dashboard page appears instead of the welcome page, choose Create new repository.)</li><li>On the Create new repository page, in the Repository name box, type <em>MyDemoRepo</em>.</li><li>In the Description box, type description of that repository.</li><li>Choose Create repository to create an empty AWS CodeCommit repository named <em>MyDemoRepo</em>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/0*yk2VLcrbdzKKLJiG.png" /></figure><p><strong>Set Up Local Development Environment</strong></p><p>Install Git and the AWS CLI on your workstation.</p><p>Linux or Mac:</p><p><a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">Installing on Linux.</a></p><pre><strong>$</strong> sudo apt-get install git-all</pre><p>Install the <a href="https://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os">AWS CLI</a> Using the Bundled Installer (Linux, OS X, or Unix)</p><p>After you install the AWS CLI, you must configure it using your IAM user credentials that created in previous step.</p><pre>aws configure</pre><p>Enter the <em>AWS access key</em> and <em>AWS secret access key</em> for the IAM user you created; enter <em>us-east-1</em> for the region name; and enter<em> json</em> for the output format.</p><pre>AWS Access Key ID [None]: Type your target AWS access key ID here, and then press Enter<br>AWS Secret Access Key [None]: Type your target AWS secret access key here, and then press Enter<br>Default region name [None]: Type us-east-1 here, and then press Enter<br>Default output format [None]: Type json here, and then press Enter</pre><p>Configure Git to use your IAM credentials and an HTTP path to access the repositories hosted by AWS CodeCommit.</p><pre>git config --global credential.helper &#39;!aws codecommit credential-helper $@&#39;<br>git config --global credential.useHttpPath true</pre><p>Set your user name and email address.</p><pre>git config --global user.name &quot;Your Name&quot;<br>git config --global user.email &quot;Your Email Address&quot;</pre><p>Create a local copy of the repository.</p><pre>git clone <a href="https://git-codecommit.us-east-1.amazonaws.com/v1/repos/DemoRepo">https://git-codecommit.us-east-1.amazonaws.com/v1/repos/DemoRepo</a></pre><p>This will clone the empty AWS Code Commit repository to you local development environment. Now you can copy the existing source code or create new source file to this folder and make a first commit. For more info: <a href="https://docs.aws.amazon.com/codecommit/latest/userguide/getting-started.html">https://docs.aws.amazon.com/codecommit/latest/userguide/getting-started.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f0611572c6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>