# Create D schema/users on RDS instance, which is not publicly available.

**URL:** <https://forum.ansible.com/t/create-d-schema-users-on-rds-instance-which-is-not-publicly-available/19543>\
**Category:** Ansible Developer\
**Created:** [October 19, 2015, 3:49am UTC](https://forum.ansible.com/t/create-d-schema-users-on-rds-instance-which-is-not-publicly-available/19543 "2015-10-19T03:49:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luuk](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@Luuk](https://forum.ansible.com/u/Luuk)\
**Post date:** [October 19, 2015, 3:49am UTC](https://forum.ansible.com/t/create-d-schema-users-on-rds-instance-which-is-not-publicly-available/19543/1 "2015-10-19T03:49:09Z")

</div>

Hi,

This might have been asked before. I am wondering if there is a way Ansible can create db schema/users, using the “mysql\_\<db|user\>” in my instance, on a RDS instance that is not publicly accessible?

I have been able to successfully create the appropriate db security group and RDS instance using Ansible. I can also remotely connect (SSH) to the RDS instance using MySQL Workbench using an EC2 instance to access the private network within the VPC that allows access to the RDS. Ie. is there a way Ansible can connect to the RDS via the EC2 instance, similar to what MySQL Workbench does (using SSH)?

Any help or pointers are much appreciated, cheerio,  
Luuk

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 19, 2015, 5:36pm UTC](https://forum.ansible.com/t/create-d-schema-users-on-rds-instance-which-is-not-publicly-available/19543/2 "2015-10-19T17:36:20Z")

</div>

you can setup the host with a jumphost command in your .ssh/config,  
ansible will just execute ssh and follow that.

---

<div class="post-metadata">

**Author:** ![Luuk](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@Luuk](https://forum.ansible.com/u/Luuk)\
**Post date:** [October 20, 2015, 9:55pm UTC](https://forum.ansible.com/t/create-d-schema-users-on-rds-instance-which-is-not-publicly-available/19543/3 "2015-10-20T21:55:30Z")

</div>

Thanks Brian,

You definitely pointed me in the right direction 🙂 Reading up on bastion/jump hosts; amongst the many articles out there I found one by [Alex Bilbie](http://alexbilbie.com/2014/07/using-ansible-with-a-bastion-host/) which give me enough input to get a working ansible playbook.

The only gotcha is that my current solution required me to put python-mysqldb on the jump host to get the mysql\_db module to work. But I suppose this is manageable.

Thanks again 🙂  
Luuk
