# CloudFormation Stack creation fails - Lets Encrypt SSL

**URL:** <https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [March 8, 2020, 2:27am UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213 "2020-03-08T02:27:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitri\_B](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/dimitri_b/32/119_2.png) [@Dimitri\_B](https://openvidu.discourse.group/u/Dimitri_B)\
**Post date:** [March 8, 2020, 2:27am UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213/1 "2020-03-08T02:27:39Z")

</div>

Hi,

I am trying to deploy openVidu on AWS, on CloudFormation.

I associated an ElasticIP to my domain (via DNS A record)

The deployment always fails at a Wait Condition step

 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/1X/be8acff54b491244aebf8aae30b28bf286e344d4.png)

**I.**  
**CloudFormation Configuration parameters**

```
openVidu-letsencrypt-synergisertechnologies

**Template**
Template URL
https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/CF-OpenVidu-latest.yaml
Stack description
Deploying OpenVidu Server over AWS

**Parameters** (22)
Key
Value
FreeHTTPAccesToRecordingVideos	false
InstanceType	t2.xlarge
KeyName	openvidu-key-3
LetsEncryptEmail	d ******* @gmail.com
MyDomainName	synergisertechnologies.com
OpenViduSecret	*********
OpenViduVersion	2.11.0
OpenViduWebhook	true
OpenViduWebhookEndpoint	http://my.endpoint.com
OpenViduWebhookEvents	sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged
OpenViduWebhookHeaders	-
OpenviduRecordingNotification	publisher_moderator
OpenviduStreamsVideoMaxRecvBandwidth	1000
OpenviduStreamsVideoMaxSendBandwidth	1000
OpenviduStreamsVideoMinRecvBandwidth	300
OpenviduStreamsVideoMinSendBandwidth	300
OwnCertCRT	-
OwnCertKEY	-
PublicElasticIP	3.12.130.13
WantToDeployDemos	true
WantToSendInfo	true
WhichCert	letsencrypt

```

**II**  
**Deployment file**  
Here are the last lines if the Deployment file:

```
Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 running 'modules:final' at Sun, 08 Mar 2020 01:29:21 +0000. Up 33.84 seconds.
2020-03-08 01:35:12,874 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [2]
2020-03-08 01:35:12,877 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2020-03-08 01:35:12,877 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 finished at Sun, 08 Mar 2020 01:35:12 +0000. Datasource DataSourceEc2Local. Up 383.95 seconds

```

**III**  
**OpenVidu logs**  
There was no openVidu log created.

The deployment works with the self signed SSL option.

Thanks

---

<div class="post-metadata">

**Author:** ![Dimitri\_B](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/dimitri_b/32/119_2.png) [@Dimitri\_B](https://openvidu.discourse.group/u/Dimitri_B)\
**Post date:** [March 11, 2020, 4:46am UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213/2 "2020-03-11T04:46:14Z")

</div>

Hi, just checking if I asked the question wrong, more information is needed or there’s a mistake in my settings? Thanks.

---

<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:** [March 12, 2020, 9:58am UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213/3 "2020-03-12T09:58:13Z")

</div>

Hello Dimitri:  
Try to deploy again, but this time disable option `Rollback on failure` (Configure stack options -\> Advanced Options -\> Stack creation options). This will prevent the instance to be terminated in case of failure so we can gather logs. Once you re-deploy with this option, the stack will still fail but you’ll be able to access instances through SSH and recover some files.

 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/1X/c92ebdcfc58bea57e1fc2018594aae526f610193.png)

After SSH, could you attach logs from:

- `/var/log/cloud-init.log`
- `/var/log/cloud-init-output.log`

Best Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![Dimitri\_B](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/dimitri_b/32/119_2.png) [@Dimitri\_B](https://openvidu.discourse.group/u/Dimitri_B)\
**Post date:** [March 14, 2020, 12:41am UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213/4 "2020-03-14T00:41:17Z")

</div>

Hi Carlos,

I cannot upload file types other than image.

I have uploaded the log files at the links below:

- `/var/log/cloud-init.log`  
[https://magicwindowescapebucket1.s3.us-east-2.amazonaws.com/openViduErrorLogs/cloud-init.log](https://magicwindowescapebucket1.s3.us-east-2.amazonaws.com/openViduErrorLogs/cloud-init.log)

- `/var/log/cloud-init-output.log`  
[https://magicwindowescapebucket1.s3.us-east-2.amazonaws.com/openViduErrorLogs/cloud-init-output.log](https://magicwindowescapebucket1.s3.us-east-2.amazonaws.com/openViduErrorLogs/cloud-init-output.log)

Thanks,  
Dimitri

---

<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:** [March 17, 2020, 4:04pm UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213/5 "2020-03-17T16:04:09Z")

</div>

Hi, I think what the problem is. There was an error with ddeb ubuntu repositories days ago, maybe now is working… We’ve updated deprecated repos in 2.12.0. You have a new release of OpenVidu if you want to try. Check: [https://openvidu.io/docs/deployment/deploying-aws/](https://openvidu.io/docs/deployment/deploying-aws/)

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![Dimitri\_B](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/dimitri_b/32/119_2.png) [@Dimitri\_B](https://openvidu.discourse.group/u/Dimitri_B)\
**Post date:** [March 21, 2020, 2:49am UTC](https://openvidu.discourse.group/t/cloudformation-stack-creation-fails-lets-encrypt-ssl/213/6 "2020-03-21T02:49:37Z")

</div>

Fantastic. It works now. Thank you Carlos!
