4

Question

What is the cause of Failed to create instance: Standalone DB Instances are not supported for Amazon RDS Aurora? Run the ansible script to create RDS Aurora but getting the error. If "aurora" is changed to "MySQL", no issue.

Ansible Script (Role)

- rds:
 region: "{{ ec2_region }}"
 zone: "{{ ec2_zone }}"
 command: create
 instance_name: new-database
 db_engine: "aurora"
 size: 20
 instance_type: db.t2.small
 username: admin
 password: 1nsecure

Error Message

fatal: [localhost]: FAILED! => {
 "changed": false,
 "failed": true,
 "invocation": {
 "module_args": {
 "apply_immediately": false,
 "aws_access_key": null,
 "aws_secret_key": null,
 "backup_retention": null,
 "backup_window": null,
 "character_set_name": null,
 "command": "create",
 "db_engine": "aurora",
 "db_name": null,
 "ec2_url": null,
 "engine_version": null,
 "force_failover": false,
 "instance_name": "new-database",
 "instance_type": "db.t2.small",
 "iops": null,
 "license_model": null,
 "maint_window": null,
 "multi_zone": null,
 "new_instance_name": null,
 "option_group": null,
 "parameter_group": null,
 "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
 "port": 3306,
 "profile": null,
 "publicly_accessible": null,
 "region": "ap-southeast-2",
 "security_groups": null,
 "security_token": null,
 "size": "20",
 "snapshot": null,
 "source_instance": null,
 "subnet": null,
 "tags": null,
 "upgrade": false,
 "username": "mysql_admin",
 "validate_certs": true,
 "vpc_security_groups": null,
 "wait": false,
 "wait_timeout": 300,
 "zone": "ap-southeast-2a"
 }
 },
 "msg": "Failed to create instance: Standalone DB Instances are not supported for the specified engine"
}

Research

Add RDS support for dbengine Aurora #3180 tells below but not sure how to add the cluster in RDS Ansible.

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to create instance: Standalone DB Instances are not supported for the specified engine"}

It's because you need to have an Aurora cluster created before you try and create the Aurora instance and you must pass the cluster name as one of the arguments when calling the create_db_instance API action.

asked Nov 14, 2017 at 7:26
1
  • I'm also looking for a solution for this. Looks like the original ticket has been closed and moved to: github.com/ansible/ansible/issues/22617 As far as i can tell this is still not released. Commented Nov 15, 2017 at 11:01

1 Answer 1

1

Aurora databases use the database cluster API rather than the database API.

This means in terraform for instance you need to create them via the rds_cluster and rds_cluster_instance resources.

In ansible using this module might work: https://github.com/manicminer/ansible-modules-rds-cluster

answered May 29, 2018 at 23:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.