Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » AWS/Azure/OpenShift » Setup a Continuous Deployment Pipeline with AWS CodePipeline
  • Troubleshooting Synology NAS Domain Join 2
    Synology NAS Domain Join: The Importance of DNS Configuration Reviews
  • Featured Image new
    Add Registry Keys via DISM in Windows Windows
  • CI With GitLab 1
    Build Docker Images with GitLab CI Automation
  • Remote desktop connection over udp and tcp
    Remote Desktop Connection behaviour over UDP and TCP Network | Monitoring
  • Enable Nexted Virtualization on VirtualBox
    ESXi VMB 411 Halting: Virtualbox Nested VT-X/AMD-V greyed out Virtualization
  • Turn On Or Off Auto Unlock For BitLocker Drive
    How To Turn On Or Off Auto-Unlock For BitLocker Drive In Windows 10/11 Security | Vulnerability Scans and Assessment
  • windows 10 logo 100739284 large
    Application pool has been disabled or Changing identity user for IIS Application Pool (Event ID 5059) Web Server
  • openshift
    Set up OpenShift Cluster using Red Hat CodeReady Containers Linux

Setup a Continuous Deployment Pipeline with AWS CodePipeline

Posted on 28/04/202325/03/2024 Temitope Odemo By Temitope Odemo No Comments on Setup a Continuous Deployment Pipeline with AWS CodePipeline
Continuous Deployment Pipeline Using AWS CodePipeline

In this guide, I will be showing you the steps to setup a Continuous Deployment Pipeline with AWS CodePipeline I will be using the Free Tier to set up an automated release pipeline that you can use to deploy your applications to the testing or production environment. We will be using AWS CodePipeline to create the pipeline. AWS CodePipeline is used to build, test, and deploy codes each time there is a code change. See how to automate Infrastructure Deployments in the Cloud with Ansible and Azure Pipelines.

We can make use of the GitHub Repository, Amazon Simple Storage Service (Amazon S3) bucket, or an AWS CodeCommit repository where we are going to store our source code. We shall also make use of AWS Elastic Beanstalk as the deployment location where you can access the application.

By the time you finish the configuration anytime you make a code change to the source code the pipeline will always detect the changes made and update the application on the testing or production environment.

Please see How To Use Azure Key Vault secrets in Azure Pipelines, how to build your first CI/CD Pipeline in Azure DevOps using ASP.Net Core Application, and

Prerequisites to setup a Continuous Deployment Pipeline with AWS CodePipeline

You need an AWS account, and you need a code repository account e.g. GitHub, AWS CodeCommit or Amazon S3.

1: Setup a Deployment Environment

Every deployment pipeline environment needs a virtual server also known as Amazon EC2 instances, where you can deploy your source code. Set up the environment before creating any deployment pipeline.

You can avoid the process of configuring an EC2 instance by just spinning up an AWS Elastic Beanstalk (EBS). With an Elastic Beanstalk, you can easily and quickly host your application without configuring a virtual server or EC2 instance.

It will automatically provision and operates the infrastructure for you, setting up the servers and configuring the load balancers on your behalf. EBS will also provide the application stack like the programming language and framework on your behalf.

Open the Elastic Beanstalk Console as shown below

Elastic-Beanstalk

Click on Create Application

Elastic-Beanstalk2

Give the Application a Name

Enter a name for the Application and Select PHP from the Platform dropdown as the technology stack. And on the Application code, select Sample application.

We are only setting up the Deployment environment where the application code will be deployed. After this click Create Application.

Please note that If you are planning to have access to your instances then you will need to select a key pair, if not then leave the default values as it is and move on with the creation of the environment for the CICD Pipeline.

Create-a-Web-App

Select the platform

When the platform is selected. Click on Create Application

Application-Platform
After the application is created, whether it is a sample or from your code repo. 

You will need to click on the Application name

TechDirectArchive_ElasticBeanStalk

Click on Create Environment button to start creating the environment you can deploy your code.

Create-Environment

Part of what an EBS will create for you automatically are an Amazon EC2 instance, a security group, an Auto Scaling group, an Amazon S3 bucket, Amazon CloudWatch alarms, and a domain name to access your application.

Configure-Environment

Select either the sample application or you can upload your code which will serve as the initial deployment to the new environment.

Configure-Environment2

Leave the default value on the Configure service access section, while steps 3-5 are optional.

Configure-Service

After the submission of the configurations, the environment will be created.

Deployment-Environment

2. Store your sample code in the repository

The next step will be to store your sample code in the repository which will be used as the source to host our code. The deployment Pipeline we will create will take code from the repository and perform some deployment actions on it.

You can use any of these options as your code repository: a GitHub repository, an Amazon S3 bucket, or an AWS CodeCommit repository.

Using GitHub Repository

Create a new GitHub repository and push your code to GitHub from your local or from any location.

Creating-New-GitHub-Repository

Using Amazon S3 as Repository

You can use Amazon S3 as your code repository, you can either move your code from the AWS GitHub repository or from your local system and upload it to an Amazon S3 bucket.

Creating-S3-Bucket

Using AWS CodeCommit as Repository

Move your code from the AWS GitHub repository or from your local system and push it to AWS CodeCommit. If you want to know more on how to work with AWS CodeCommit, read How to Setup HTTPS users using Git credentials and Pushing Code to AWS CodeCommit

Open the AWS CodeCommit console and choose Create Repository. Enter the repository name and click Create.

AWS-CodeCommit

As you can see, the Repository has been created.

AWS-CodeCommit-Repository-Created

Once the Repository is created then you can Add your file or your sample code. Click on Add file, then choose Upload file.

Repository-file

On the Upload a file page, click on the Choose file button and select your zipped code file. Enter the Author name and Email address, then click on Commit changes.

Commit-Changes

3. Steps to Creating your Pipeline

The next step now is to create and configure a simple pipeline with two actions: source and deploy. We are going to provide the CodePipeline with the locations of the source code repository and deployment environment we earlier created.

Open the AWS CodePipeline console and click Create pipeline.

Create-Pipeline

Enter the name for your pipeline, leave other settings on default and click Next.

Pipeline-Settings

Note: After creating a pipeline, you cannot change its name.

Add source stage

On the next page Add Source stage, you will need to select the location of the source code we created earlier. You can select AWS CodeCommit, Amazon S3 or GitHub.

But in this guide, I will be showing you how to connect with AWS CodeCommit as the Code Repository.

this repo is where you stored your input artifacts for your pipeline. Choose the provider and then provide the connection details. 
Source-Provider

Select AWS CodeCommit for the Source provider and follow these steps.

  1. Select the repository you created earlier from the drop-down list to serve as a source provider for your pipeline.  
  2. Select main as the branch.
  3. Amazon Cloudwatch Events is recommended for change detection options.
  4. Choose CodePipeline default as the output artifact format.
  5. Click Next
Source-Location

AWS CodePipeline will allow you to plug your desired build provider into your pipeline because a standard continuous deployment pipeline will always require a build stage, where code is compiled, and unit tested. But in this guide that aspect will not be covered we will skip the build stage.

Under the Add build stage section, click on Skip build stage.

Skip-Build-Stage

Under the deploy section make these selections:

  1. Deploy provider: AWS Elastic Beanstalk.
  2. Region: Leave default Region.
  3. Application name: The application you created earlier.
  4. Environment name: Deployment Environment you created earlier.
  5. Click Next.
Deploy-Stage

Review all the information and choose Create pipeline.

4. Next Step is activating the pipeline and deploying your code

Once everything is set you can launch your pipeline and when it’s created, it will start to run automatically.

Deployment Stages

The first stage is that it will detect the application code in your source location, bundles up the files, and moves it to the second stage.

Pipeline-Created

In the next stage, it will pass the code to Elastic Beanstalk which will deploy the code to the EC2 instance. Remember that EBS contains the EC2 instance that will host and run your code.

Pipeline-Created2

After the Deployment Pipeline is created click on AWS Elastic Beanstalk.

Deployed-to-EBS

Inside the Elastic beanstalk click on the domain which will launch the application deployed.

Application-Domain

If all goes well the application gets launched successfully.

Congratulations

Whenever you make a change to the code, and you push back to the AWS CodeCommit, GitHub or Amazon S3 it will automatically be deployed via the Pipeline created and the changes on the code will reflect.

I hope you found this blog post on how to setup a Continuous Deployment Pipeline with AWS CodePipeline interesting and helpful. In case you have any questions do not hesitate to ask in the comment section.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
AWS/Azure/OpenShift Tags:Github

Post navigation

Previous Post: Why you should attend VeeamOn 2023
Next Post: How to use GitHub as Source Provider for AWS CodePipeline

Related Posts

  • banner
    Various ways to restart an AWS EC2 instance AWS/Azure/OpenShift
  • VBAWS comprehensive guide
    Deep Dive into Protecting AWS EC2, RDS Instances and VPC AWS/Azure/OpenShift
  • images
    Lifecycle rules: Transition to Glacier still appears in s3 AWS/Azure/OpenShift
  • S3 Bucket 1
    How to delete AWS S3 Bucket and Objects via  AWS CLI from Linux AWS/Azure/OpenShift
  • Secure Web Server
    How to secure a Web Server on a Windows VM in Azure using TLS/SSL Certificates Saved in Azure Key Vault AWS/Azure/OpenShift
  • EC2
    How to Add and Format a New Virtual Disk to an EC2 Instance AWS/Azure/OpenShift

More Related Articles

banner Various ways to restart an AWS EC2 instance AWS/Azure/OpenShift
VBAWS comprehensive guide Deep Dive into Protecting AWS EC2, RDS Instances and VPC AWS/Azure/OpenShift
images Lifecycle rules: Transition to Glacier still appears in s3 AWS/Azure/OpenShift
S3 Bucket 1 How to delete AWS S3 Bucket and Objects via  AWS CLI from Linux AWS/Azure/OpenShift
Secure Web Server How to secure a Web Server on a Windows VM in Azure using TLS/SSL Certificates Saved in Azure Key Vault AWS/Azure/OpenShift
EC2 How to Add and Format a New Virtual Disk to an EC2 Instance AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Troubleshooting Synology NAS Domain Join 2
    Synology NAS Domain Join: The Importance of DNS Configuration Reviews
  • Featured Image new
    Add Registry Keys via DISM in Windows Windows
  • CI With GitLab 1
    Build Docker Images with GitLab CI Automation
  • Remote desktop connection over udp and tcp
    Remote Desktop Connection behaviour over UDP and TCP Network | Monitoring
  • Enable Nexted Virtualization on VirtualBox
    ESXi VMB 411 Halting: Virtualbox Nested VT-X/AMD-V greyed out Virtualization
  • Turn On Or Off Auto Unlock For BitLocker Drive
    How To Turn On Or Off Auto-Unlock For BitLocker Drive In Windows 10/11 Security | Vulnerability Scans and Assessment
  • windows 10 logo 100739284 large
    Application pool has been disabled or Changing identity user for IIS Application Pool (Event ID 5059) Web Server
  • openshift
    Set up OpenShift Cluster using Red Hat CodeReady Containers Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.