# Error provisioning RDS instance

**URL:** <https://forum.ansible.com/t/error-provisioning-rds-instance/18761>\
**Category:** Ansible Project\
**Created:** [July 14, 2015, 10:23pm UTC](https://forum.ansible.com/t/error-provisioning-rds-instance/18761 "2015-07-14T22:23:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [July 14, 2015, 10:23pm UTC](https://forum.ansible.com/t/error-provisioning-rds-instance/18761/1 "2015-07-14T22:23:45Z")

</div>

I’m getting the following error when I use the rds module:

failed: [localhost] =\> {“failed”: true, “parsed”: false}  
Traceback (most recent call last):  
File “/Users/guy/.ansible/tmp/ansible-tmp-1436911513.8-147068920945542/rds”, line 2822, in   
main()  
File “/Users/guy/.ansible/tmp/ansible-tmp-1436911513.8-147068920945542/rds”, line 1012, in main  
invocations[module.params.get(‘command’)](module, conn)  
File “/Users/guy/.ansible/tmp/ansible-tmp-1436911513.8-147068920945542/rds”, line 645, in create\_db\_instance  
result = conn.get\_db\_instance(instance\_name)  
File “/Users/guy/.ansible/tmp/ansible-tmp-1436911513.8-147068920945542/rds”, line 415, in get\_db\_instance  
raise e  
boto.exception.JSONResponseError: JSONResponseError: 400 Bad Request  
{‘RequestId’: ‘673d1f59-2a74-11e5-af29-2dbda5511805’, ‘Error’: {‘Message’: ‘The parameter Filter: db-instance-id is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens.’, ‘Code’: ‘InvalidParameterValue’, ‘Type’: ‘Sender’}}

FATAL: all hosts have already failed – aborting

The task config is as follows:

- name: provision rds master  
rds:  
command: create  
instance\_name: “{{ wl\_name }}\_db\_master”  
db\_engine: MySQL  
db\_name: “{{ db\_name }}”  
instance\_type: db.m3.large  
username: “{{ db\_username }}”  
password: “{{ wl\_name}}\_db\_password”  
size: 50  
wait: yes  
wait\_timeout: 600  
multi\_zone: no  
subnet: “{{ wl\_name }}-rds-sg”  
tags:  
Application: “{{ wl\_name }}”  
Environment: prod  
region: us-west-1

I guess it’s a problem with the lookup to check if the instance already exists, but I’m not sure what it’s supposed to be using as the lookup parameter. Does anyone know why it’s wrong, and how to fix it?

Thanks,  
Guy

---

<div class="post-metadata">

**Author:** ![Baraa\_Basata1](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@Baraa\_Basata1](https://forum.ansible.com/u/Baraa_Basata1)\
**Post date:** [July 15, 2015, 5:15pm UTC](https://forum.ansible.com/t/error-provisioning-rds-instance/18761/2 "2015-07-15T17:15:24Z")

</div>

The error message here is the RDS API, and it suggests to me that the instance\_name contains invalid characters. The API response says that RDS instance identifiers must have “only ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens”.

The underscore character that you have in the instance\_name is not in that list of valid characters.

-Baraa

---

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [July 15, 2015, 11:26pm UTC](https://forum.ansible.com/t/error-provisioning-rds-instance/18761/3 "2015-07-15T23:26:29Z")

</div>

Ahhh…thank you! That was the issue after all. I changed the instance name and it fixed the problem. I was confused because it was talking about parameter filters.

Thanks again,  
Guy
