Skip to main content

Command Palette

Search for a command to run...

How to setup CD for AWS Elastic Beanstalk using CodePipeline?

As developers, we like to automate boring, repitative tasks like uploading your code to the server... So let's do it!

Published
2 min read
How to setup CD for AWS Elastic Beanstalk using CodePipeline?

Introduction

So, Now you have your code running on AWS. It's secure and cheap, but you still have to upload your code in zip files. How archaic😱!! Let's fix this in this article using another awesome AWS Service called the CodePipeline. This is gonna be a short one guys.

This article is a sequel to the previous one called How to setup a https server in elastic beanstalk. It's not required to read the previous one, but I would recommend doing so before reading this.

What is Code Pipeline?

It is an AWS Service that provides fully managed, continous devlivery that helps you automate the release pipelines for fast and reliable application and infrastructure. You can automate various phases like

  • Build
  • Test
  • Deploy and this automation will run every time there is a code change.

It supports various source code sources, we'll be using github but there is very little difference in how to use any other service if you need to.

How to Setup CD

Go to code pipeline option in your console and press "Create New Pipeline".

image.png

Enter the name and leave everything as default. Click "Next"

image.png

In the source stage, select the provider and fill in the details. We'll be using Github (Version 2) here.

image.png

If you require a build stage, configure this step. We'll be skipping this stage.

image.png

In the deploy stage, select AWS Elastic Beanstalk and fill other details. Click "Next" and review everything.

Conclusion

Once you submit, your pipeline will be active. Now, as soon as you push code to github, it'll reflect in your deployment very soon.

Readme Badges

If you need github readme badges, refer to [this article] (https://medium.com/swlh/aws-ci-cd-dynamic-build-badge-display-on-github-1e9a3b76db5a) for how to set it up. You can also use this npm library for monitoring the status.

How to deploy web application to AWS Elastic Beanstalk(The Cheap Way)?

Part 1 of 2

In this series, we aim at understanding more about AWS, Elastic Beanstalk and Code Pipleline by deploying a server in the cheapest way possible. Most of the services we use will be free tier eligible.

Up next

How to setup a https server in Elastic Beanstalk (The Cheap Way)?

A good way to get started without spending a lot of money by utilizing the free tier