# AWS EBS / STAND ALONE SQL SERVER

This tutorial will guide you through the couple of steps required to setup and run ngSurvey on Amazon Web Services Elastic Beanstalk using a separate stand alone RDS SQL Server database.

1\) Start by opening the link below to open the EBS application creation wizard with pre-configured settings to setup ngSurvey with NgInx as a reverse proxy.

* [Nginx Enabled AWS Elastic Beanstalk install source package](https://eu-central-1.console.aws.amazon.com/elasticbeanstalk/home?region=eu-central-1#/newApplication?applicationName=ngSurvey\&platform=Docker%20running%20on%2064bit%20Amazon%20Linux%202\&environmentType=SingleInstance\&sourceBundleUrl=https:%2F%2Fngsurvey.s3.eu-central-1.amazonaws.com%2Fngsurveyeenginx.aws.zip)

2\) On the just opened application configuration and chose *Public S3 URL*.

![](/files/-Mkk9kW-dN6ArJjt8FA0)

3\) Go to the network settings and set a VPC, your instance must be in the same VPC as the database that you will create in step 4.

![](/files/y0wf8cj5fhiCVd2wP6dy)

4\) Wait that your instance gets ready, once its ready go to the RDS section to create your database, make sure that your virtual private cloud VPC is the same that you have setup in 3 for your EBS instance&#x20;

![](/files/8HVdKcVvf2hAIh6w06CT)

![](/files/UwuB0loUeIbpgLBScseS)

{% hint style="info" %}
ngSurvey supports also mySQL or MariaDB as a database. If you're using mySQL or MariaDB make sure to use a valid mySQLor MariaDB connection string in step 8.
{% endhint %}

5\) Once the database is created you must grant the network access from the EBS instance to your database. Open your database Connectivity & Security pane and open its default VPC security group.

![](/files/5IsaQQTY9NLxNP3d518M)

6\) Edit the inbound rules o the security group add a new inbound rule that will allow all traffic coming from your EBS instance.\
&#x20;![](/files/dcm3rQ0uuv53vVU0sZul)

![](/files/PzSf0uoyBh8gRzyOaFmP)&#x20;

7\) Go back to your database dashboard and write down the Endpoint name

![](/files/PkZpYBjPcX53WtvwrKcZ)

8\) Now that your database is ready and allows traffic from your EBS instance go back to your EBS instance configuration and set an environment variable "*ConnectionStrings:NGSurveyDB*" and set its value to with the connection string using your database endpoint eg:   *Server=yourdatabasesendpoint;Initial Catalog=NGSurveyDB;User ID=youradminuser;Password=yourpassword*.

![](/files/zkYW51ogO7QAQPfHpjZQ)

9\) Check that ngSurvey was properly configured using this link (replace the instance url by your own instance ur)l : <http://yourinstanceurl/api/system/status>. This might take a 1-2 minutes to load if ngSurvey is currently setting up your database for the first time.

![](/files/BYaqZmG1T953okX3R8Vz)

![](/files/Iid5PCrWMNYf7MavDZWk)

9\) You can now go to your instance URL to use ngSurvey.

## Troubleshooting

If ngSurvey doesn't start go to your EBS instance log tab and download the last 100 lines.

![](/files/hrbjYQeLjyeDQm77SQEp)

Check the nginx log and eb-docker log for any error message. &#x20;

![](/files/5JJGLtYNjis53H8ycciF)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ngsurvey.com/installation-setup/installation/amazon-web-services/aws-elastic-beanstalk/aws-ebs-stand-alone-sql-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
