aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.59k stars 4.14k forks source link

`aws rds create-db-cluster --replication-source-identifier` has bad parameter requirements #2027

Closed kevinsperrine closed 4 years ago

kevinsperrine commented 8 years ago

TL;DR aws rds create-db-cluster is still requiring --master-username and --master-user-password when the --replication-source-identifier option is set. Those options are actually mutually exclusive.

I uninstalled awscli and did a forced reinstall with cache disabled, but no success

Successfully installed awscli-1.10.38 botocore-1.4.28 colorama-0.3.3 docutils-0.12 futures-3.0.5 jmespath-0.9.0 pyasn1-0.1.9 python-dateutil-2.5.3 rsa-3.4.2 s3transfer-0.0.1 six-1.10.0
# Called as specified in the docs.
[ec2-user@ip-OBSCURED create-rds-dr-cluster]$ aws rds create-db-cluster --region us-west-2 --db-cluster-identifier appa1p-us-east-1-rds-dr --engine aurora --replication-source-identifier arn:aws:rds:us-east-1:OBSCURED:cluster:appa1p-dbcluster-1v5y2nsaviq46
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --master-username is required
# adding --master-username for giggles
[ec2-user@ip-OBSCURED create-rds-dr-cluster]$ aws rds create-db-cluster --region us-west-2 --db-cluster-identifier appa1p-us-east-1-rds-dr --engine aurora --replication-source-identifier arn:aws:rds:us-east-1:OBSCURED:cluster:appa1p-dbcluster-1v5y2nsaviq46 --master-username auser
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --master-user-password is required
# adding --master-user-password to complete the chain.
[ec2-user@ip-OBSCURED create-rds-dr-cluster]$ aws rds create-db-cluster --region us-west-2 --db-cluster-identifier appa1p-us-east-1-rds-dr --engine aurora --replication-source-identifier arn:aws:rds:us-east-1:OBSCURED:cluster:appa1p-dbcluster-1v5y2nsaviq46 --master-username auser --master-user-password apassword1

An error occurred (InvalidParameterCombination) when calling the CreateDBCluster operation: Cannot specify user name for read replica cluster
jamesls commented 8 years ago

Interesting, even their API docs list username/password as required: http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html

Let me follow up with the service team.

kevinsperrine commented 8 years ago

Thanks, @jamesls!

kevinsperrine commented 8 years ago

@jamesls Any updates here?

RobertFischer commented 4 years ago

@jamesls @KaibaLopez Any updates?

kdaily commented 4 years ago

Hi @RobertFischer,

Is this still an issue? I see that the documentation now shows --master-username and --master-user-password as optional.

Thanks!

github-actions[bot] commented 4 years ago

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

miensol commented 3 years ago

Hi @RobertFischer As far as I can tell the documentation doesn't make it clear that there's a relation between replication-source-identifier and master username. Could you please clarify which one is right?

kdaily commented 3 years ago

Hi @miensol - I can give this feedback to the documentation team that this is not clear. Per the existing documentation, supplying replication-source-identifier does the following:

You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a read replica of another DB cluster or Amazon RDS MySQL or PostgreSQL DB instance.

Edit: It looks like there is room for an example for using this parameter. I'll let the docs team know!

miensol commented 3 years ago

Thanks @kdaily

I think this part is pretty clear. What is not clear however is that one cannot supply replication-source-identifier along with e.g.

--master-username master \
    --master-user-password secret99 \

This is somewhat important when the RDS is used via CloudFormation. Perhaps I should report the issue in a different project?