Aws-cli: Invalid DBParameterGroupName when calling CopyDBParameterGroup, which seems like the wrong parameter

Created on 24 Sep 2019  路  2Comments  路  Source: aws/aws-cli

Reopening https://github.com/aws/aws-cli/issues/2886

I'm choosing a copy operation that's right out of the copy-db-parameter-group examples. (default.mysql5.6 exists as a parameter group identifier).

$ aws rds copy-db-parameter-group \
    --source-db-parameter-group-identifier default.mysql5.6 \
    --target-db-parameter-group-identifier another.mysql5.6 \
    --target-db-parameter-group-description bkup

This produces the following error message:

An error occurred (InvalidParameterValue) when calling the CopyDBParameterGroup operation: The parameter DBParameterGroupName 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.

What's jumping out at me here is the mention of DBParameterGroupName, because it doesn't match any of the parameter names. Compare this to the CLI skeleton:

$ aws rds copy-db-parameter-group --generate-cli-skeleton
{
    "SourceDBParameterGroupIdentifier": "", 
    "TargetDBParameterGroupIdentifier": "", 
    "TargetDBParameterGroupDescription": "", 
    "Tags": [
        {
            "Key": "", 
            "Value": ""
        }
    ]
}

Does this indicate that, somewhere deep in the AWS API, the wrong key for the payload is being used? I tried to find any mention of a copy command in the only source file with rds in the title (https://github.com/aws/aws-cli/blob/develop/awscli/customizations/rds.py) but came up empty.

Or, is the error message literally true, meaning that the . characters _in the existing parameter group identifier_ are invalid? I just attempted making this same copy command by using JSON instead of command line options, but it failed with the same message.

Expected behavior is any one of the following:

  • Some indication that certain built-in parameter groups just can't be copied
  • Renaming the built-in parameter groups such that they can be legally referenced in a request
  • Some custom workaround to recognize "special" parameter group identifiers, and effect a copy operation some different way.
service-api

Most helpful comment

Copying default is not supported. Why wont they allow it and also such a misleading error message

You can't copy a default parameter group. However, you can create a new parameter group that is based on a default parameter group.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html#USER_WorkingWithParamGroups.Copying

All 2 comments

I'm not sure why this would be happening. The exception is coming back from the service, so your theory on one of the parameters being used within the API somewhere else seems reasonable. Unfortunately, I don't really have anymore insight on this than you would. I'd try reaching out the the RDS team via AWS Support.

Copying default is not supported. Why wont they allow it and also such a misleading error message

You can't copy a default parameter group. However, you can create a new parameter group that is based on a default parameter group.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html#USER_WorkingWithParamGroups.Copying

Was this page helpful?
0 / 5 - 0 ratings