# Change OV pro media nodes AWS instance type

**URL:** https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051
**Category:** Issues with deployment
**Tags:** v2
**Created:** [September 23, 2020, 3:24pm UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051 "2020-09-23T15:24:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vsx-sieber](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vsx-sieber/32/2172_2.png) [@vsx-sieber](https://openvidu.discourse.group/u/vsx-sieber)
#### Post date: [September 23, 2020, 3:24pm UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051/1 "2020-09-23T15:24:53Z")

</div>

Hi,  
we have an OpenVidu Pro license and we currently use AWS for our OV deployments.  
We use OV for many different use cases and all of these use cases bring very different requirements in terms of capabilities of the media notes. Therefore we would like to change the instance types of new media notes for each new spawned nodes. Is this currently supported without deleting and re-creating the OpenVidu Pro stack in CloudFormation each time?

Best regards  
Sven

---

<div class="post-metadata">

### Author: ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)
#### Post date: [September 23, 2020, 5:42pm UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051/2 "2020-09-23T17:42:41Z")

</div>

Hi @vsx-sieber. To change you AWS Media Nodes instance type, you need to edit the OpenVidu configuration file in `/opt/openvidu/.env` and change the property:

```auto
AWS_INSTANCE_TYPE=c5.xlarge

```

Also you will need to restart OpenVidu Pro Server.

Regards,  
Carlos

---

<div class="post-metadata">

### Author: ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)
#### Post date: [September 23, 2020, 6:21pm UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051/3 "2020-09-23T18:21:54Z")

</div>

Regarding your issue about creating different machines dynamically, it is not supported right now. You need to restart OpenVidu.

Regards,  
Carlos

---

<div class="post-metadata">

### Author: ![vsx-sieber](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vsx-sieber/32/2172_2.png) [@vsx-sieber](https://openvidu.discourse.group/u/vsx-sieber)
#### Post date: [September 24, 2020, 8:55am UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051/4 "2020-09-24T08:55:55Z")

</div>

Hi @cruizba.  
Thankfs for the fast reply. I think we are good for now with changing the instance type in the config and restarting OV.  
Best regards,  
Sven

---

<div class="post-metadata">

### Author: ![vsx-sieber](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vsx-sieber/32/2172_2.png) [@vsx-sieber](https://openvidu.discourse.group/u/vsx-sieber)
#### Post date: [October 12, 2020, 12:58pm UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051/5 "2020-10-12T12:58:05Z")

</div>

I just tried your solution, but unfortunately it isn’t working.  
I changed the value of the parameter `AWS_INSTANCE_TYPE` to `c5.xlarge` in the config file /opt/openvidu/.env and restared the OpenVidu Pro server. I then tried to launch a new Media Node via OpenVidu inspector, but it keeps launching instances of type c5.9xlarge as Media Nodes (this was the value i used when creating the CloudFormation stack). It just complety ignores the value in the .env config file.  
Is this a bug or is there another configuration that takes precedence over the .env file?

---

<div class="post-metadata">

### Author: ![vsx-sieber](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vsx-sieber/32/2172_2.png) [@vsx-sieber](https://openvidu.discourse.group/u/vsx-sieber)
#### Post date: [October 12, 2020, 1:19pm UTC](https://openvidu.discourse.group/t/change-ov-pro-media-nodes-aws-instance-type/2051/6 "2020-10-12T13:19:55Z")

</div>

Ok, so i restarted OpenVidu Pro server again but this time i used the `./openvidu restart` command (instead of the Restart button in OpenVidu inspector -\> config section) and now it works.
