How to deploy your application with AWS CodeStar

How to deploy your application with AWS CodeStar

In this tutorial, i am gonna show you how to deploy your application with CodeStar on AWS.

What is CodeStar ?

CodeStar is a service from AWS that allows you to quickly develop, build, and deploy applications.
With AWS CodeStar, you can set up your entire continuous delivery toolchain very quickly, allowing you to start releasing code faster.

Let's practice to understand

Required : you need to have an AWS account.

  • Connect to your AWS account and go the the Management Console.

  • Then, search for CodeStar

Capture d'écran 2021-04-04 16:08:27.png

Click on Create Project

Capture d'écran 2021-04-04 16:09:59.png

You need to choose a project template , you cannot start from an existing project.

I chose an Express project to be deployed on an EC2 instance.

Capture d'écran 2021-04-04 16:11:42.png

Click on Next

Capture d'écran 2021-04-04 16:15:22.png

Pick a name for your project and connect to your Github account.

Then select the instance type you want your application to be deployed to (choose t2 micro for free tier )

Capture d'écran 2021-04-04 16:17:04.png

Click on Create and ... wait for the magic.

It's gonna take a few minutes to create all the resources needed.

You can follow it by looking to the Project Activity pannel

Capture d'écran 2021-04-04 16:21:53.png

You can also follow the stack creation on Cloudformation

Capture d'écran 2021-04-04 16:23:40.png

When all the resources are created and deployed, you can see the whole pipeline :

Capture d'écran 2021-04-04 16:31:34.png

To see your application, go to EC2 on the management console

Capture d'écran 2021-04-04 16:41:31.png

Click on the running instance

And then find the IPV4 address and click on it :

You should see this :

Capture d'écran 2021-04-04 16:45:18.png

NB : if you don't see anything and the website loads and loads again, check that your are in HTTP !

You can see that on the Inbound rules of the security group

Capture d'écran 2021-04-04 16:47:17.png

Make changes !

Now you can make changes in you code on your repository.

Push it and watch the pipeline run automatically and redeploy your application updated !

Capture d'écran 2021-04-04 16:49:21.png

Wrap up !

If you don't want to be charged, don't forget to delete everything.

Go to the CodeStar console, select your project and hit Delete.

Capture d'écran 2021-04-04 16:50:38.png

Confirm by typing delete.

And wait for all the resources to be deleted.

NB: the only thing that won't be destroyed is the Github repository, you need to delete it yourself.

Congrats ! You know how to use CodeStar for your next project :)

Did you find this article valuable?

Support Sonia Manoubi by becoming a sponsor. Any amount is appreciated!