I created a Heroku-like UI to deploy your apps on AWS
Tags: aws
Published: 2021-09-04 17:43:56

AWS is one of the most reliable and used Cloud provider, but the user experience is terrible. This is why my team and I had to fix it to make it usable by any developer!

[Qovery](https://www.qovery.com) is a web app that turns app deployment on your AWS account as easy as Heroku. Zero AWS knowledge is required! Even my grandma can deploy her favorite apps in a few clicks.

![Push your code, Qovery handles the rest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i69gztiral3fz8vkgsf8.png)

> In 18 months, 10 000 developers deploy their apps on AWS with Qovery 🎉 Thanks to all our users and our growing dev community 🙏

In this article, you'll learn how to deploy an app from your git repo and PostgreSQL on AWS with Qovery in 5 steps. 👇

# Requirements

Before you get started, I assume you have:

* an [AWS account](https://aws.amazon.com)
* a [Qovery account](https://console.qovery.com)

# Deploy

Qovery is a middleware to deploy your apps on your AWS account. From your app build, to the scaling of your app, everything you need to run your app is handled by Qovery.

![From app build to scaling - Qovery got you back](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d2akmildbtlye4reucwx.png)

## 1. Install Qovery on your AWS account

To deploy your apps with Qovery, you need to install it on your AWS account. Here are the steps:

1. Create AWS API credentials: [follow this guide](https://hub.qovery.com/docs/using-qovery/configuration/cloud-service-provider/amazon-web-services/)
2. Create a Free, Pro or Business organization in Qovery.
3. Go to your organization settings > clusters tab.
4. Add a cluster.

![AWS cluster created with Qovery](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4obdnpamdwcmdo25yt2m.jpg)

Note: Until mid-September 2021, you need to use [our cluster API](https://api-doc.qovery.com/#operation/createCluster) to install Qovery on your AWS account. 

## 2. Deploy your app

To deploy your app, it is as easy as selecting your Git repository and that's it!

### Configuration
1/ Create a project "my project".
2/ Create a "dev" environment.
3/ Add your app -> [You can fork and deploy this app](https://github.com/evoxmusic/ShortMe-URL-Shortener).
4/ Change "build mode" to Dockerfile
5/ Add port 5555
6/ Save the config

![Configure your app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxkkcrj88vrywarje25u.png)

### Deploy

Click to deploy your app now.

![Deploy your app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4cxsscdhxnpqyhmt0ex2.png)

The deployment is in progress and you can take a look to the deployment logs. 

![Deployment logs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tu9vq1x7hsbi7w3z1mtg.png)

The status becomes "RUNNING" when deployed.

![App deployed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pgujdccq9j3fez27xkpw.png)

A preview URL is associated to my app and accessible via "Actions" > "Open"

![Open my app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0yu5wq5lju4qzzrvs03f.png)

And voila the result!

![Open app deployed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9f63u8nypkbflejbgu2y.png)

## 3. Deploy your PostgreSQL

PostgreSQL is by far the most used database out there. So, even if my app does not need to connect to a DB, here is how to connect it to your app. 

1/ Go to your "dev" environment

![Add a database](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ti19vvrsqph3e452e9n4.png) 

2/ Add a PostgreSQL database

![Select postgres](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a06gr39uamsm4wz2503d.png)
 
3/ Deploy it

![Postgres deployment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avm2irnqfa9oulwnxsbx.png) 

You can once again watch what happens while your Postgres DB is deployed.

![Deployment in progress for PSQL](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sa5pgiul9hscmawd59nf.png)

Qovery handles everything for you. Note: by default, the database is a container, but it is possible to change the mode to "managed service" to use a PostgreSQL RDS managed by AWS.

## 4. Connect your app to your PostgreSQL DB

Your PostgreSQL database is available but not yet connected to your app. To connect it do the following steps:

1. Open your database settings
2. Link your app to your PostgreSQL database
3. Go to environment variables
4. Create a secret alias "DATABASE_URL"
5. Restart your app

![Secret alias](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/30uwwt681s58rhiez6mw.png)

Your app can now use the environment variable "DATABASE_URL" and get access to the database.

## 5. Add a domain to your app

1. Go to your app settings
2. Select "Domain" tab
3. Add your domain
4. Create a CNAME record to link your domain to the provided value.
5. Restart your app

![add your domain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndfixsiw6zhcyksum88m.png) 

Qovery automatically provides a valid SSL/TLS certificate for your domain 😎

## 6. Auto-deploy

Qovery also supports auto-deploy when you commit and push your code on GitHub and Gitlab. Check out this video showing how auto-deploy in action 👩‍💻

{% youtube 3KYa4dnY5ps %}

That's it! Easy right?

# What's next?

It might looks magic, but it is not! Our [deployment engine](https://github.com/Qovery/engine) is open source (written in Rust) and you are free to contribute 🙂.

With my team, we plan to support more features and Cloud provider like GCP in the coming months ([see our roadmap](https://roadmap.qovery.com)). We are also [hiring](https://jobs.qovery.com) 😎.

Happy to have your feedback and questions👇