aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.55k stars 4.13k forks source link

rds modify-db-snapshot-attribute won't accept actual snapshot identifier #8296

Closed darianjd closed 1 year ago

darianjd commented 1 year ago

Describe the bug

rds modify-db-snapshot-attribute is rejecting an actual snapshot identifier as invalid

Expected Behavior

The same snapshot identifier should be accepted just as it is accepted by decribe-db-snapshot:

{
    "DBSnapshotAttributesResult": {
        "DBSnapshotIdentifier": "rds:xxxx-xxxx-xxxx-xxxx-1234-12-12-12-12",
        "DBSnapshotAttributes": [
            {
                "AttributeName": "restore",
                "AttributeValues": []
            }
        ]
    }
}```

### Current Behavior

`aws rds modify-db-snapshot-attribute --db-snapshot-identifier` will not accept an actual snapshot identifier, citing the name as invalid. ```# aws rds modify-db-snapshot-attribute --db-snapshot-identifier rds:xxxx-xxxx-xxxx-xxxx-1234-12-12-12-12 --attribute-name restore --values-to-add ########

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

Reproduction Steps

Attempt to modify an attribute of a db snapshot with a colon in its name.

e.g.: aws rds modify-db-snapshot-attribute --db-snapshot-identifier rds:xxxx-xxxx-xxxx-xxxx-1234-12-12-12-12 --attribute-name restore --values-to-add ########

In the case. the value being added would be another AWS account.

Possible Solution

Change the string validation being used for modify-db-snapshot-attribute to match the validation used for describe-db-snapshot-attributes

Additional Information/Context

No response

CLI version used

2.13.30

Environment details (OS name and version, etc.)

RHEL 8.8

tim-finnigan commented 1 year ago

Hi @darianjd thanks for reaching out.

The CLI modify-db-snapshot-attribute command corresponds to the RDS ModifyDBSnapshotAttribute API. The InvalidParameterValue error is returned by the RDS API (for reference, it is documented here.)

I was not able to reproduce this issue. When I tried to assign a DB snapshot identifier in that format, I received the following error

> aws rds create-db-snapshot --db-snapshot-identifier rds:my-snapshot --db-instance-identifier mydbinstance
> 
> An error occurred (InvalidParameterValue) when calling the CreateDBSnapshot operation: The parameter DBSnapshotIdentifier 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.

I could not modify it that way either:

image

So I'm not sure why you saw an identifier returned rds:... prefix. When I ran describe-db-snapshots and describe-db-snapshot-attributes after assigning an identifer my-snapshot, it does not prepend that value with rds* in the response:


image

Did you assign your DB snapshot identifer in the console with the rds:* prefix? Or do you have any code modifications or third-party software that could be adding that? If you could share your debug logs (with any sensitive info redacted) by adding --debug to the command, that might help provide more insight.

darianjd commented 1 year ago

Hi Tim,

We have automatic snapshots which prepend "rds:" to the identifier of the snapshot. Here's the json for its description:

        {
            "DBSnapshotIdentifier":
"rds:fleet-planner-stage-encrypted-2-2023110808-scrub-2023-11-08-08-37",
            "DBInstanceIdentifier":
"fleet-planner-stage-encrypted-2-2023110808-scrub",
            "SnapshotCreateTime": "2023-11-08T08:37:14.954000+00:00",
            "Engine": "postgres",
            "AllocatedStorage": 3000,
            "Status": "available",
            "Port": 5432,
...

Here is the output from the aws-cli:


version: aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8
2023-11-08 18:57:35,846 - MainThread - awscli.clidriver - DEBUG - Arguments
entered to CLI: ['rds', 'copy-db-snapshot', '--source-db-snapshot',
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05',
'--target-db-snapshot', 'fms20231108a', '--debug']
2023-11-08 18:57:35,872 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_s3 at
0x7fbc6a637600>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_ddb at
0x7fbc6a86cae0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <bound method
BasicCommand.add_command of <class
'awscli.customizations.configure.configure.ConfigureCommand'>>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function change_name at
0x7fbc6a9ccfe0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function change_name at
0x7fbc6a9fc4a0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function alias_opsworks_cm at
0x7fbc6a6460c0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_history_commands
at 0x7fbc6a8b34c0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <bound method
BasicCommand.add_command of <class
'awscli.customizations.devcommands.CLIDevCommand'>>
2023-11-08 18:57:35,874 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_waiters at
0x7fbc6a645f80>
2023-11-08 18:57:35,874 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <bound method
AliasSubCommandInjector.on_building_command_table of
<awscli.alias.AliasSubCommandInjector object at 0x7fbc6a705390>>
2023-11-08 18:57:35,874 - MainThread - botocore.loaders - DEBUG - Loading
JSON file: /usr/local/aws-cli/v2/2.13.30/dist/awscli/data/cli.json
2023-11-08 18:57:35,877 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function resolve_types at
0x7fbc6a788ea0>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function no_sign_request at
0x7fbc6a7891c0>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function resolve_verify_ssl at
0x7fbc6a789120>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function resolve_cli_read_timeout
at 0x7fbc6a789300>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function
resolve_cli_connect_timeout at 0x7fbc6a789260>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <built-in method update of dict
object at 0x7fbc6a6fec00>
2023-11-08 18:57:35,879 - MainThread - awscli.clidriver - DEBUG - CLI
version: aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8 prompt/off
2023-11-08 18:57:35,879 - MainThread - awscli.clidriver - DEBUG - Arguments
entered to CLI: ['rds', 'copy-db-snapshot', '--source-db-snapshot',
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05',
'--target-db-snapshot', 'fms20231108a', '--debug']
2023-11-08 18:57:35,879 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function add_timestamp_parser at
0x7fbc6a637f60>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function register_uri_param_handler
at 0x7fbc6ac44860>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function add_binary_formatter at
0x7fbc6a6b7560>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function no_pager_handler at
0x7fbc6ad4b420>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function
inject_assume_role_provider_cache at 0x7fbc6ac78180>
2023-11-08 18:57:35,883 - MainThread - botocore.utils - DEBUG - IMDS
ENDPOINT: http://169.254.169.254/
2023-11-08 18:57:35,884 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function attach_history_handler at
0x7fbc6a8a3d80>
2023-11-08 18:57:35,884 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function inject_json_file_cache at
0x7fbc6a864d60>
2023-11-08 18:57:35,912 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/service-2.json
2023-11-08 18:57:35,925 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/service-2.sdk-extras.json
2023-11-08 18:57:35,936 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <function
_building_command_table at 0x7fbc6a7a02c0>
2023-11-08 18:57:35,937 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <function
_add_generate_db_auth_token at 0x7fbc6a7a00e0>
2023-11-08 18:57:35,937 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <function add_waiters at
0x7fbc6a645f80>
2023-11-08 18:57:35,968 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/waiters-2.json
2023-11-08 18:57:35,969 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <bound method
AliasSubCommandInjector.on_building_command_table of
<awscli.alias.AliasSubCommandInjector object at 0x7fbc6a705390>>
2023-11-08 18:57:35,971 - MainThread - awscli.clidriver - DEBUG -
OrderedDict([('source-db-snapshot-identifier',
<awscli.arguments.CLIArgument object at 0x7fbc699e8f10>),
('target-db-snapshot-identifier', <awscli.arguments.CLIArgument object at
0x7fbc699ec050>), ('kms-key-id', <awscli.arguments.CLIArgument object at
0x7fbc699ec0d0>), ('tags', <awscli.arguments.ListArgument object at
0x7fbc699ec350>), ('copy-tags', <awscli.arguments.BooleanArgument object at
0x7fbc699ec510>), ('no-copy-tags', <awscli.arguments.BooleanArgument object
at 0x7fbc699ec590>), ('pre-signed-url', <awscli.arguments.CLIArgument
object at 0x7fbc699ec690>), ('option-group-name',
<awscli.arguments.CLIArgument object at 0x7fbc699ec850>),
('target-custom-availability-zone', <awscli.arguments.CLIArgument object at
0x7fbc699ec950>), ('copy-option-group', <awscli.arguments.BooleanArgument
object at 0x7fbc699ec990>), ('no-copy-option-group',
<awscli.arguments.BooleanArgument object at 0x7fbc699eca10>),
('source-region', <awscli.arguments.CLIArgument object at 0x7fbc699ecb50>)])
2023-11-08 18:57:35,971 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_streaming_output_arg at 0x7fbc6a6444a0>
2023-11-08 18:57:35,971 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_cli_input_json at 0x7fbc6ac78ae0>
2023-11-08 18:57:35,971 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_cli_input_yaml at 0x7fbc6ac78b80>
2023-11-08 18:57:35,972 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
unify_paging_params at 0x7fbc6a86d120>
2023-11-08 18:57:36,004 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/paginators-1.json
2023-11-08 18:57:36,005 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/paginators-1.sdk-extras.json
2023-11-08 18:57:36,005 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_generate_skeleton at 0x7fbc6a7596c0>
2023-11-08 18:57:36,005 - MainThread - botocore.hooks - DEBUG - Event
before-building-argument-table-parser.rds.copy-db-snapshot: calling handler
<bound method OverrideRequiredArgsArgument.override_required_args of
<awscli.customizations.cliinput.CliInputJSONArgument object at
0x7fbc699a4ed0>>
2023-11-08 18:57:36,005 - MainThread - botocore.hooks - DEBUG - Event
before-building-argument-table-parser.rds.copy-db-snapshot: calling handler
<bound method OverrideRequiredArgsArgument.override_required_args of
<awscli.customizations.cliinput.CliInputYAMLArgument object at
0x7fbc699bfb50>>
2023-11-08 18:57:36,006 - MainThread - botocore.hooks - DEBUG - Event
before-building-argument-table-parser.rds.copy-db-snapshot: calling handler
<bound method GenerateCliSkeletonArgument.override_required_args of
<awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument
object at 0x7fbc699da510>>
2023-11-08 18:57:36,006 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds_copy-db-snapshot: calling handler <function
add_waiters at 0x7fbc6a645f80>
2023-11-08 18:57:36,006 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds_copy-db-snapshot: calling handler <bound method
AliasSubCommandInjector.on_building_command_table of
<awscli.alias.AliasSubCommandInjector object at 0x7fbc6a705390>>
2023-11-08 18:57:36,007 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.source-db-snapshot-identifier: calling
handler <awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,007 - MainThread - botocore.hooks - DEBUG - Event
process-cli-arg.rds.copy-db-snapshot: calling handler
<awscli.argprocess.ParamShorthandParser object at 0x7fbc6ad91b90>
2023-11-08 18:57:36,008 - MainThread - awscli.arguments - DEBUG - Unpacked
value of 'rds:fleet-planner-prod-encrypted-2023-11-08-07-05' for parameter
"source_db_snapshot_identifier":
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05'
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.target-db-snapshot-identifier: calling
handler <awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
process-cli-arg.rds.copy-db-snapshot: calling handler
<awscli.argprocess.ParamShorthandParser object at 0x7fbc6ad91b90>
2023-11-08 18:57:36,008 - MainThread - awscli.arguments - DEBUG - Unpacked
value of 'fms20231108a' for parameter "target_db_snapshot_identifier":
'fms20231108a'
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.kms-key-id: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.tags: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.copy-tags: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.pre-signed-url: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.option-group-name: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.target-custom-availability-zone: calling
handler <awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.copy-option-group: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.source-region: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.cli-input-json: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.cli-input-yaml: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.generate-cli-skeleton: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
calling-command.rds.copy-db-snapshot: calling handler <bound method
CliInputArgument.add_to_call_parameters of
<awscli.customizations.cliinput.CliInputJSONArgument object at
0x7fbc699a4ed0>>
2023-11-08 18:57:36,010 - MainThread - botocore.hooks - DEBUG - Event
calling-command.rds.copy-db-snapshot: calling handler <bound method
CliInputArgument.add_to_call_parameters of
<awscli.customizations.cliinput.CliInputYAMLArgument object at
0x7fbc699bfb50>>
2023-11-08 18:57:36,010 - MainThread - botocore.hooks - DEBUG - Event
calling-command.rds.copy-db-snapshot: calling handler <bound method
GenerateCliSkeletonArgument.generate_skeleton of
<awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument
object at 0x7fbc699da510>>
2023-11-08 18:57:36,010 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: env
2023-11-08 18:57:36,010 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: assume-role
2023-11-08 18:57:36,010 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: assume-role-with-web-identity
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: sso
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: shared-credentials-file
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: custom-process
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: config-file
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: ec2-credentials-file
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: boto-config
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: container-role
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: iam-role
2023-11-08 18:57:36,012 - MainThread - urllib3.connectionpool - DEBUG -
Starting new HTTP connection (1): 169.254.169.254:80
2023-11-08 18:57:36,015 - MainThread - urllib3.connectionpool - DEBUG -
http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 200 56
2023-11-08 18:57:36,016 - MainThread - urllib3.connectionpool - DEBUG -
Resetting dropped connection: 169.254.169.254
2023-11-08 18:57:36,017 - MainThread - urllib3.connectionpool - DEBUG -
http://169.254.169.254:80 "GET /latest/meta-data/iam/security-credentials/
HTTP/1.1" 200 63
2023-11-08 18:57:36,018 - MainThread - urllib3.connectionpool - DEBUG -
Resetting dropped connection: 169.254.169.254
2023-11-08 18:57:36,020 - MainThread - urllib3.connectionpool - DEBUG -
http://169.254.169.254:80 "GET
/latest/meta-data/iam/security-credentials/eksctl-transfix-staging-nodegroup-NodeInstanceRole-*********
HTTP/1.1" 200 1582
2023-11-08 18:57:36,023 - MainThread - botocore.credentials - DEBUG - Found
credentials from IAM Role:
eksctl-transfix-staging-nodegroup-NodeInstanceRole-Y3MI23L1X8FL
2023-11-08 18:57:36,024 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/endpoints.json
2023-11-08 18:57:36,042 - MainThread - botocore.hooks - DEBUG - Event
choose-service-name: calling handler <function handle_service_name_alias at
0x7fbc6ca70ae0>
2023-11-08 18:57:36,074 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/endpoint-rule-set-1.json
2023-11-08 18:57:36,075 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/partitions.json
2023-11-08 18:57:36,081 - MainThread - botocore.hooks - DEBUG - Event
creating-client-class.rds: calling handler <function
add_generate_db_auth_token at 0x7fbc6d25e200>
2023-11-08 18:57:36,081 - MainThread - botocore.hooks - DEBUG - Event
creating-client-class.rds: calling handler <function
add_generate_presigned_url at 0x7fbc6d25ec00>
2023-11-08 18:57:36,081 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: environment_service
2023-11-08 18:57:36,081 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: environment_global
2023-11-08 18:57:36,081 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: config_service
2023-11-08 18:57:36,082 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: config_global
2023-11-08 18:57:36,082 - MainThread - botocore.configprovider - DEBUG - No
configured endpoint found.
2023-11-08 18:57:36,084 - MainThread - botocore.endpoint - DEBUG - Setting
rds timeout as (60, 60)
2023-11-08 18:57:36,086 - MainThread - botocore.regions - DEBUG - Calling
endpoint provider with parameters: {'Region': 'us-east-1', 'UseDualStack':
False, 'UseFIPS': False}
2023-11-08 18:57:36,087 - MainThread - botocore.regions - DEBUG - Endpoint
provider result: https://rds.us-east-1.amazonaws.com
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
provide-client-params.rds.CopyDBSnapshot: calling handler <function
base64_decode_input_blobs at 0x7fbc6a6b7600>
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
before-parameter-build.rds.CopyDBSnapshot: calling handler <function
generate_idempotent_uuid at 0x7fbc6ca72d40>
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
before-call.rds.CopyDBSnapshot: calling handler <function
inject_presigned_url_rds at 0x7fbc6ca73920>
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
before-call.rds.CopyDBSnapshot: calling handler <function
inject_api_version_header_if_needed at 0x7fbc6ca84860>
2023-11-08 18:57:36,087 - MainThread - botocore.endpoint - DEBUG - Making
request for OperationModel(name=CopyDBSnapshot) with params: {'url_path':
'/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type':
'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent':
'aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8 prompt/off command/rds.copy-db-snapshot'}, 'body':
{'Action': 'CopyDBSnapshot', 'Version': '2014-10-31',
'SourceDBSnapshotIdentifier':
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05',
'TargetDBSnapshotIdentifier': 'fms20231108a'}, 'url': '
https://rds.us-east-1.amazonaws.com/', 'context': {'client_region':
'us-east-1', 'client_config': <botocore.config.Config object at
0x7fbc692d89d0>, 'has_streaming_input': False, 'auth_type': None}}
2023-11-08 18:57:36,088 - MainThread - botocore.hooks - DEBUG - Event
request-created.rds.CopyDBSnapshot: calling handler <bound method
RequestSigner.handler of <botocore.signers.RequestSigner object at
0x7fbc69b2c110>>
2023-11-08 18:57:36,088 - MainThread - botocore.hooks - DEBUG - Event
choose-signer.rds.CopyDBSnapshot: calling handler <function
set_operation_specific_signer at 0x7fbc6ca72c00>
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG - Calculating
signature using v4 auth.
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG -
CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:rds.us-east-1.amazonaws.com
x-amz-date:20231108T185736Z
x-amz-security-token:**********
content-type;host;x-amz-date;x-amz-security-token
**************************
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20231108T185736Z
20231108/us-east-1/rds/aws4_request
**********
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG - Signature:
**********
2023-11-08 18:57:36,089 - MainThread - botocore.endpoint - DEBUG - Sending
http request: <AWSPreparedRequest stream_output=False, method=POST, url=
https://rds.us-east-1.amazonaws.com/, headers={'Content-Type':
b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent':
b'aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8 prompt/off command/rds.copy-db-snapshot', 'X-Amz-Date':
b'20231108T185736Z', 'X-Amz-Security-Token': '*********', 'Authorization':
b'AWS4-HMAC-SHA256
Credential=**********/20231108/us-east-1/rds/aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-security-token,
Signature=*******', 'Content-Length': '159'}>
2023-11-08 18:57:36,090 - MainThread - botocore.httpsession - DEBUG -
Certificate path:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/cacert.pem
2023-11-08 18:57:36,090 - MainThread - urllib3.connectionpool - DEBUG -
Starting new HTTPS connection (1): rds.us-east-1.amazonaws.com:443
2023-11-08 18:57:36,137 - MainThread - urllib3.connectionpool - DEBUG -
https://rds.us-east-1.amazonaws.com:443 "POST / HTTP/1.1" 404 294
2023-11-08 18:57:36,138 - MainThread - botocore.parsers - DEBUG - Response
headers: {'x-amzn-RequestId': 'cfb9771f-8ccd-4ff5-82f5-36e5da694eff',
'Strict-Transport-Security': 'max-age=31536000', 'Content-Type':
'text/xml', 'Content-Length': '294', 'Date': 'Wed, 08 Nov 2023 18:57:35
GMT'}
2023-11-08 18:57:36,138 - MainThread - botocore.parsers - DEBUG - Response
body:
b'<ErrorResponse
xmlns="http://rds.amazonaws.com/doc/2014-10-31/"><Error><Type>Sender</Type><Code>DBSnapshotNotFound</Code><Message>DBSnapshot
not found:
rds:fleet-planner-prod-encrypted-2023-11-08-07-05</Message></Error><RequestId>cfb9771f-8ccd-4ff5-82f5-36e5da694eff</RequestId></ErrorResponse>'
2023-11-08 18:57:36,142 - MainThread - botocore.parsers - DEBUG - Response
headers: {'x-amzn-RequestId': 'cfb9771f-8ccd-4ff5-82f5-36e5da694eff',
'Strict-Transport-Security': 'max-age=31536000', 'Content-Type':
'text/xml', 'Content-Length': '294', 'Date': 'Wed, 08 Nov 2023 18:57:35
GMT'}
2023-11-08 18:57:36,143 - MainThread - botocore.parsers - DEBUG - Response
body:
b'<ErrorResponse
xmlns="http://rds.amazonaws.com/doc/2014-10-31/"><Error><Type>Sender</Type><Code>DBSnapshotNotFound</Code><Message>DBSnapshot
not found:
rds:fleet-planner-prod-encrypted-2023-11-08-07-05</Message></Error><RequestId>cfb9771f-8ccd-4ff5-82f5-36e5da694eff</RequestId></ErrorResponse>'
2023-11-08 18:57:36,143 - MainThread - botocore.hooks - DEBUG - Event
needs-retry.rds.CopyDBSnapshot: calling handler <bound method
RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object
at 0x7fbc69317250>>
2023-11-08 18:57:36,143 - MainThread - botocore.retries.standard - DEBUG -
Not retrying request.
2023-11-08 18:57:36,143 - MainThread - botocore.hooks - DEBUG - Event
after-call.rds.CopyDBSnapshot: calling handler <bound method
RetryQuotaChecker.release_retry_quota of
<botocore.retries.standard.RetryQuotaChecker object at 0x7fbc692d9a10>>
2023-11-08 18:57:36,146 - MainThread - awscli.clidriver - DEBUG - Exception
caught in main()
Traceback (most recent call last):
  File "awscli/clidriver.py", line 460, in main
  File "awscli/clidriver.py", line 595, in __call__
  File "awscli/clidriver.py", line 798, in __call__
  File "awscli/clidriver.py", line 929, in invoke
  File "awscli/clidriver.py", line 941, in _make_client_call
  File "awscli/botocore/client.py", line 342, in _api_call
  File "awscli/botocore/client.py", line 701, in _make_api_call
botocore.errorfactory.DBSnapshotNotFoundFault: An error occurred
(DBSnapshotNotFound) when calling the CopyDBSnapshot operation: DBSnapshot
not found: rds:fleet-planner-prod-encrypted-2023-11-08-07-05

An error occurred (DBSnapshotNotFound) when calling the CopyDBSnapshot
operation: DBSnapshot not found:
rds:fleet-planner-prod-encrypted-2023-11-08-07-05```

On Mon, Nov 6, 2023 at 7:14 PM Tim Finnigan ***@***.***>
wrote:

> Hi @darianjd <https://github.com/darianjd> thanks for reaching out.
>
> The CLI modify-db-snapshot-attribute
> <https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/modify-db-snapshot-attribute.html>
> command corresponds to the RDS ModifyDBSnapshotAttribute
> <https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBSnapshotAttribute.html>
> API. The InvalidParameterValue error is returned by the RDS API (for
> reference, it is documented here
> <https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonErrors.html>
> .)
>
> I was not able to reproduce this issue. When I tried to assign a DB
> snapshot identifier in that format, I received the following error
>
> > aws rds create-db-snapshot --db-snapshot-identifier rds:my-snapshot --db-instance-identifier mydbinstance
> >
> > An error occurred (InvalidParameterValue) when calling the CreateDBSnapshot operation: The parameter DBSnapshotIdentifier 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.
>
> I could not modify it that way either:
>
> [image: image]
> <https://user-images.githubusercontent.com/87778557/280878900-aa781edd-523b-4bc0-9bec-eb24870bfac1.png>
>
> So I'm not sure why you saw an identifier returned rds:... prefix. When I
> ran describe-db-snapshots
> <https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-snapshots.html>
> and describe-db-snapshot-attributes
> <https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-snapshot-attributes.html>
> after assigning an identifer my-snapshot, it does not prepend that value
> with rds* in the response:
> ------------------------------
>
> [image: image]
> <https://user-images.githubusercontent.com/87778557/280878203-63d9883d-c5de-4ccf-9706-6087996b9835.png>
>
> Did you assign your DB snapshot identifer in the console with the rds:*
> prefix? Or do you have any code modifications or third-party software that
> could be adding that? If you could share your debug logs (with any
> sensitive info redacted) by adding --debug to the command, that might
> help provide more insight.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/aws/aws-cli/issues/8296#issuecomment-1797066587>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AC4P6SCGLWKHUWQRPDIAGCTYDF4MZAVCNFSM6AAAAAA64QU636VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJXGA3DMNJYG4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>

-- 
*Darian DeFalco*
*Staff Site Reliability Engineer*
<https://transfix.io/>

Website
<https://transfix.io/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=website>
| LinkedIn <https://www.linkedin.com/company/transfixio/posts/?feedView=all> |
Facebook <https://www.facebook.com/transfixIO>

Data. Driven.
<https://transfix.io/team/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=people>Market
Insights <https://transfix.io/insights>

Purpose. Driven. Annual ESG Report
<https://transfix.io/sustainability/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=esg_report>

Career. Driven. View Our Careers Page
<https://transfix.io/company/careers/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=careers>

-- 
This message may contain confidential and privileged information.  If it 
has been sent to you in error, please reply to advise the sender of the 
error and then immediately delete this message.
darianjd commented 1 year ago

Hi Tim,

We can close this issue. The underlying problem is unrelated to the cli.

On Wed, Nov 8, 2023 at 2:05 PM Darian DeFalco @.***> wrote:

Hi Tim,

We have automatic snapshots which prepend "rds:" to the identifier of the snapshot. Here's the json for its description:

        {
            "DBSnapshotIdentifier":
"rds:fleet-planner-stage-encrypted-2-2023110808-scrub-2023-11-08-08-37",
            "DBInstanceIdentifier":
"fleet-planner-stage-encrypted-2-2023110808-scrub",
            "SnapshotCreateTime": "2023-11-08T08:37:14.954000+00:00",
            "Engine": "postgres",
            "AllocatedStorage": 3000,
            "Status": "available",
            "Port": 5432,
...

Here is the output from the aws-cli:


version: aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8
2023-11-08 18:57:35,846 - MainThread - awscli.clidriver - DEBUG -
Arguments entered to CLI: ['rds', 'copy-db-snapshot',
'--source-db-snapshot',
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05',
'--target-db-snapshot', 'fms20231108a', '--debug']
2023-11-08 18:57:35,872 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_s3 at
0x7fbc6a637600>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_ddb at
0x7fbc6a86cae0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <bound method
BasicCommand.add_command of <class
'awscli.customizations.configure.configure.ConfigureCommand'>>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function change_name at
0x7fbc6a9ccfe0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function change_name at
0x7fbc6a9fc4a0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function alias_opsworks_cm at
0x7fbc6a6460c0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_history_commands
at 0x7fbc6a8b34c0>
2023-11-08 18:57:35,873 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <bound method
BasicCommand.add_command of <class
'awscli.customizations.devcommands.CLIDevCommand'>>
2023-11-08 18:57:35,874 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <function add_waiters at
0x7fbc6a645f80>
2023-11-08 18:57:35,874 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.main: calling handler <bound method
AliasSubCommandInjector.on_building_command_table of
<awscli.alias.AliasSubCommandInjector object at 0x7fbc6a705390>>
2023-11-08 18:57:35,874 - MainThread - botocore.loaders - DEBUG - Loading
JSON file: /usr/local/aws-cli/v2/2.13.30/dist/awscli/data/cli.json
2023-11-08 18:57:35,877 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function resolve_types at
0x7fbc6a788ea0>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function no_sign_request at
0x7fbc6a7891c0>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function resolve_verify_ssl at
0x7fbc6a789120>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function resolve_cli_read_timeout
at 0x7fbc6a789300>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <function
resolve_cli_connect_timeout at 0x7fbc6a789260>
2023-11-08 18:57:35,878 - MainThread - botocore.hooks - DEBUG - Event
top-level-args-parsed: calling handler <built-in method update of dict
object at 0x7fbc6a6fec00>
2023-11-08 18:57:35,879 - MainThread - awscli.clidriver - DEBUG - CLI
version: aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8 prompt/off
2023-11-08 18:57:35,879 - MainThread - awscli.clidriver - DEBUG -
Arguments entered to CLI: ['rds', 'copy-db-snapshot',
'--source-db-snapshot',
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05',
'--target-db-snapshot', 'fms20231108a', '--debug']
2023-11-08 18:57:35,879 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function add_timestamp_parser at
0x7fbc6a637f60>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function register_uri_param_handler
at 0x7fbc6ac44860>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function add_binary_formatter at
0x7fbc6a6b7560>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function no_pager_handler at
0x7fbc6ad4b420>
2023-11-08 18:57:35,880 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function
inject_assume_role_provider_cache at 0x7fbc6ac78180>
2023-11-08 18:57:35,883 - MainThread - botocore.utils - DEBUG - IMDS
ENDPOINT: http://169.254.169.254/
2023-11-08 18:57:35,884 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function attach_history_handler at
0x7fbc6a8a3d80>
2023-11-08 18:57:35,884 - MainThread - botocore.hooks - DEBUG - Event
session-initialized: calling handler <function inject_json_file_cache at
0x7fbc6a864d60>
2023-11-08 18:57:35,912 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/service-2.json
2023-11-08 18:57:35,925 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/service-2.sdk-extras.json
2023-11-08 18:57:35,936 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <function
_building_command_table at 0x7fbc6a7a02c0>
2023-11-08 18:57:35,937 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <function
_add_generate_db_auth_token at 0x7fbc6a7a00e0>
2023-11-08 18:57:35,937 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <function add_waiters at
0x7fbc6a645f80>
2023-11-08 18:57:35,968 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/waiters-2.json
2023-11-08 18:57:35,969 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds: calling handler <bound method
AliasSubCommandInjector.on_building_command_table of
<awscli.alias.AliasSubCommandInjector object at 0x7fbc6a705390>>
2023-11-08 18:57:35,971 - MainThread - awscli.clidriver - DEBUG -
OrderedDict([('source-db-snapshot-identifier',
<awscli.arguments.CLIArgument object at 0x7fbc699e8f10>),
('target-db-snapshot-identifier', <awscli.arguments.CLIArgument object at
0x7fbc699ec050>), ('kms-key-id', <awscli.arguments.CLIArgument object at
0x7fbc699ec0d0>), ('tags', <awscli.arguments.ListArgument object at
0x7fbc699ec350>), ('copy-tags', <awscli.arguments.BooleanArgument object at
0x7fbc699ec510>), ('no-copy-tags', <awscli.arguments.BooleanArgument object
at 0x7fbc699ec590>), ('pre-signed-url', <awscli.arguments.CLIArgument
object at 0x7fbc699ec690>), ('option-group-name',
<awscli.arguments.CLIArgument object at 0x7fbc699ec850>),
('target-custom-availability-zone', <awscli.arguments.CLIArgument object at
0x7fbc699ec950>), ('copy-option-group', <awscli.arguments.BooleanArgument
object at 0x7fbc699ec990>), ('no-copy-option-group',
<awscli.arguments.BooleanArgument object at 0x7fbc699eca10>),
('source-region', <awscli.arguments.CLIArgument object at 0x7fbc699ecb50>)])
2023-11-08 18:57:35,971 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_streaming_output_arg at 0x7fbc6a6444a0>
2023-11-08 18:57:35,971 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_cli_input_json at 0x7fbc6ac78ae0>
2023-11-08 18:57:35,971 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_cli_input_yaml at 0x7fbc6ac78b80>
2023-11-08 18:57:35,972 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
unify_paging_params at 0x7fbc6a86d120>
2023-11-08 18:57:36,004 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/paginators-1.json
2023-11-08 18:57:36,005 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/paginators-1.sdk-extras.json
2023-11-08 18:57:36,005 - MainThread - botocore.hooks - DEBUG - Event
building-argument-table.rds.copy-db-snapshot: calling handler <function
add_generate_skeleton at 0x7fbc6a7596c0>
2023-11-08 18:57:36,005 - MainThread - botocore.hooks - DEBUG - Event
before-building-argument-table-parser.rds.copy-db-snapshot: calling handler
<bound method OverrideRequiredArgsArgument.override_required_args of
<awscli.customizations.cliinput.CliInputJSONArgument object at
0x7fbc699a4ed0>>
2023-11-08 18:57:36,005 - MainThread - botocore.hooks - DEBUG - Event
before-building-argument-table-parser.rds.copy-db-snapshot: calling handler
<bound method OverrideRequiredArgsArgument.override_required_args of
<awscli.customizations.cliinput.CliInputYAMLArgument object at
0x7fbc699bfb50>>
2023-11-08 18:57:36,006 - MainThread - botocore.hooks - DEBUG - Event
before-building-argument-table-parser.rds.copy-db-snapshot: calling handler
<bound method GenerateCliSkeletonArgument.override_required_args of
<awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument
object at 0x7fbc699da510>>
2023-11-08 18:57:36,006 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds_copy-db-snapshot: calling handler <function
add_waiters at 0x7fbc6a645f80>
2023-11-08 18:57:36,006 - MainThread - botocore.hooks - DEBUG - Event
building-command-table.rds_copy-db-snapshot: calling handler <bound method
AliasSubCommandInjector.on_building_command_table of
<awscli.alias.AliasSubCommandInjector object at 0x7fbc6a705390>>
2023-11-08 18:57:36,007 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.source-db-snapshot-identifier: calling
handler <awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,007 - MainThread - botocore.hooks - DEBUG - Event
process-cli-arg.rds.copy-db-snapshot: calling handler
<awscli.argprocess.ParamShorthandParser object at 0x7fbc6ad91b90>
2023-11-08 18:57:36,008 - MainThread - awscli.arguments - DEBUG - Unpacked
value of 'rds:fleet-planner-prod-encrypted-2023-11-08-07-05' for parameter
"source_db_snapshot_identifier":
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05'
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.target-db-snapshot-identifier: calling
handler <awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
process-cli-arg.rds.copy-db-snapshot: calling handler
<awscli.argprocess.ParamShorthandParser object at 0x7fbc6ad91b90>
2023-11-08 18:57:36,008 - MainThread - awscli.arguments - DEBUG - Unpacked
value of 'fms20231108a' for parameter "target_db_snapshot_identifier":
'fms20231108a'
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.kms-key-id: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.tags: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.copy-tags: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,008 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.pre-signed-url: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.option-group-name: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.target-custom-availability-zone: calling
handler <awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.copy-option-group: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.source-region: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.cli-input-json: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.cli-input-yaml: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
load-cli-arg.rds.copy-db-snapshot.generate-cli-skeleton: calling handler
<awscli.paramfile.URIArgumentHandler object at 0x7fbc69b3aad0>
2023-11-08 18:57:36,009 - MainThread - botocore.hooks - DEBUG - Event
calling-command.rds.copy-db-snapshot: calling handler <bound method
CliInputArgument.add_to_call_parameters of
<awscli.customizations.cliinput.CliInputJSONArgument object at
0x7fbc699a4ed0>>
2023-11-08 18:57:36,010 - MainThread - botocore.hooks - DEBUG - Event
calling-command.rds.copy-db-snapshot: calling handler <bound method
CliInputArgument.add_to_call_parameters of
<awscli.customizations.cliinput.CliInputYAMLArgument object at
0x7fbc699bfb50>>
2023-11-08 18:57:36,010 - MainThread - botocore.hooks - DEBUG - Event
calling-command.rds.copy-db-snapshot: calling handler <bound method
GenerateCliSkeletonArgument.generate_skeleton of
<awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument
object at 0x7fbc699da510>>
2023-11-08 18:57:36,010 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: env
2023-11-08 18:57:36,010 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: assume-role
2023-11-08 18:57:36,010 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: assume-role-with-web-identity
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: sso
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: shared-credentials-file
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: custom-process
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: config-file
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: ec2-credentials-file
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: boto-config
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: container-role
2023-11-08 18:57:36,011 - MainThread - botocore.credentials - DEBUG -
Looking for credentials via: iam-role
2023-11-08 18:57:36,012 - MainThread - urllib3.connectionpool - DEBUG -
Starting new HTTP connection (1): 169.254.169.254:80
2023-11-08 18:57:36,015 - MainThread - urllib3.connectionpool - DEBUG -
http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 200 56
2023-11-08 18:57:36,016 - MainThread - urllib3.connectionpool - DEBUG -
Resetting dropped connection: 169.254.169.254
2023-11-08 18:57:36,017 - MainThread - urllib3.connectionpool - DEBUG -
http://169.254.169.254:80 "GET
/latest/meta-data/iam/security-credentials/ HTTP/1.1" 200 63
2023-11-08 18:57:36,018 - MainThread - urllib3.connectionpool - DEBUG -
Resetting dropped connection: 169.254.169.254
2023-11-08 18:57:36,020 - MainThread - urllib3.connectionpool - DEBUG -
http://169.254.169.254:80 "GET
/latest/meta-data/iam/security-credentials/eksctl-transfix-staging-nodegroup-NodeInstanceRole-*********
HTTP/1.1" 200 1582
2023-11-08 18:57:36,023 - MainThread - botocore.credentials - DEBUG -
Found credentials from IAM Role:
eksctl-transfix-staging-nodegroup-NodeInstanceRole-Y3MI23L1X8FL
2023-11-08 18:57:36,024 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/endpoints.json
2023-11-08 18:57:36,042 - MainThread - botocore.hooks - DEBUG - Event
choose-service-name: calling handler <function handle_service_name_alias at
0x7fbc6ca70ae0>
2023-11-08 18:57:36,074 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/rds/2014-10-31/endpoint-rule-set-1.json
2023-11-08 18:57:36,075 - MainThread - botocore.loaders - DEBUG - Loading
JSON file:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/data/partitions.json
2023-11-08 18:57:36,081 - MainThread - botocore.hooks - DEBUG - Event
creating-client-class.rds: calling handler <function
add_generate_db_auth_token at 0x7fbc6d25e200>
2023-11-08 18:57:36,081 - MainThread - botocore.hooks - DEBUG - Event
creating-client-class.rds: calling handler <function
add_generate_presigned_url at 0x7fbc6d25ec00>
2023-11-08 18:57:36,081 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: environment_service
2023-11-08 18:57:36,081 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: environment_global
2023-11-08 18:57:36,081 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: config_service
2023-11-08 18:57:36,082 - MainThread - botocore.configprovider - DEBUG -
Looking for endpoint for rds via: config_global
2023-11-08 18:57:36,082 - MainThread - botocore.configprovider - DEBUG -
No configured endpoint found.
2023-11-08 18:57:36,084 - MainThread - botocore.endpoint - DEBUG - Setting
rds timeout as (60, 60)
2023-11-08 18:57:36,086 - MainThread - botocore.regions - DEBUG - Calling
endpoint provider with parameters: {'Region': 'us-east-1', 'UseDualStack':
False, 'UseFIPS': False}
2023-11-08 18:57:36,087 - MainThread - botocore.regions - DEBUG - Endpoint
provider result: https://rds.us-east-1.amazonaws.com
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
provide-client-params.rds.CopyDBSnapshot: calling handler <function
base64_decode_input_blobs at 0x7fbc6a6b7600>
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
before-parameter-build.rds.CopyDBSnapshot: calling handler <function
generate_idempotent_uuid at 0x7fbc6ca72d40>
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
before-call.rds.CopyDBSnapshot: calling handler <function
inject_presigned_url_rds at 0x7fbc6ca73920>
2023-11-08 18:57:36,087 - MainThread - botocore.hooks - DEBUG - Event
before-call.rds.CopyDBSnapshot: calling handler <function
inject_api_version_header_if_needed at 0x7fbc6ca84860>
2023-11-08 18:57:36,087 - MainThread - botocore.endpoint - DEBUG - Making
request for OperationModel(name=CopyDBSnapshot) with params: {'url_path':
'/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type':
'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent':
'aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8 prompt/off command/rds.copy-db-snapshot'}, 'body':
{'Action': 'CopyDBSnapshot', 'Version': '2014-10-31',
'SourceDBSnapshotIdentifier':
'rds:fleet-planner-prod-encrypted-2023-11-08-07-05',
'TargetDBSnapshotIdentifier': 'fms20231108a'}, 'url': '
https://rds.us-east-1.amazonaws.com/', 'context': {'client_region':
'us-east-1', 'client_config': <botocore.config.Config object at
0x7fbc692d89d0>, 'has_streaming_input': False, 'auth_type': None}}
2023-11-08 18:57:36,088 - MainThread - botocore.hooks - DEBUG - Event
request-created.rds.CopyDBSnapshot: calling handler <bound method
RequestSigner.handler of <botocore.signers.RequestSigner object at
0x7fbc69b2c110>>
2023-11-08 18:57:36,088 - MainThread - botocore.hooks - DEBUG - Event
choose-signer.rds.CopyDBSnapshot: calling handler <function
set_operation_specific_signer at 0x7fbc6ca72c00>
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG - Calculating
signature using v4 auth.
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG -
CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:rds.us-east-1.amazonaws.com
x-amz-date:20231108T185736Z
x-amz-security-token:**********
content-type;host;x-amz-date;x-amz-security-token
**************************
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG -
StringToSign:
AWS4-HMAC-SHA256
20231108T185736Z
20231108/us-east-1/rds/aws4_request
**********
2023-11-08 18:57:36,089 - MainThread - botocore.auth - DEBUG - Signature:
**********
2023-11-08 18:57:36,089 - MainThread - botocore.endpoint - DEBUG - Sending
http request: <AWSPreparedRequest stream_output=False, method=POST, url=
https://rds.us-east-1.amazonaws.com/, headers={'Content-Type':
b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent':
b'aws-cli/2.13.30 Python/3.11.6 Linux/5.10.192-183.736.amzn2.x86_64
exe/x86_64.rhel.8 prompt/off command/rds.copy-db-snapshot', 'X-Amz-Date':
b'20231108T185736Z', 'X-Amz-Security-Token': '*********', 'Authorization':
b'AWS4-HMAC-SHA256
Credential=**********/20231108/us-east-1/rds/aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-security-token,
Signature=*******', 'Content-Length': '159'}>
2023-11-08 18:57:36,090 - MainThread - botocore.httpsession - DEBUG -
Certificate path:
/usr/local/aws-cli/v2/2.13.30/dist/awscli/botocore/cacert.pem
2023-11-08 18:57:36,090 - MainThread - urllib3.connectionpool - DEBUG -
Starting new HTTPS connection (1): rds.us-east-1.amazonaws.com:443
2023-11-08 18:57:36,137 - MainThread - urllib3.connectionpool - DEBUG -
https://rds.us-east-1.amazonaws.com:443 "POST / HTTP/1.1" 404 294
2023-11-08 18:57:36,138 - MainThread - botocore.parsers - DEBUG - Response
headers: {'x-amzn-RequestId': 'cfb9771f-8ccd-4ff5-82f5-36e5da694eff',
'Strict-Transport-Security': 'max-age=31536000', 'Content-Type':
'text/xml', 'Content-Length': '294', 'Date': 'Wed, 08 Nov 2023 18:57:35
GMT'}
2023-11-08 18:57:36,138 - MainThread - botocore.parsers - DEBUG - Response
body:
b'<ErrorResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/"><Error><Type>Sender</Type><Code>DBSnapshotNotFound</Code><Message>DBSnapshot
not found:
rds:fleet-planner-prod-encrypted-2023-11-08-07-05</Message></Error><RequestId>cfb9771f-8ccd-4ff5-82f5-36e5da694eff</RequestId></ErrorResponse>'
2023-11-08 18:57:36,142 - MainThread - botocore.parsers - DEBUG - Response
headers: {'x-amzn-RequestId': 'cfb9771f-8ccd-4ff5-82f5-36e5da694eff',
'Strict-Transport-Security': 'max-age=31536000', 'Content-Type':
'text/xml', 'Content-Length': '294', 'Date': 'Wed, 08 Nov 2023 18:57:35
GMT'}
2023-11-08 18:57:36,143 - MainThread - botocore.parsers - DEBUG - Response
body:
b'<ErrorResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/"><Error><Type>Sender</Type><Code>DBSnapshotNotFound</Code><Message>DBSnapshot
not found:
rds:fleet-planner-prod-encrypted-2023-11-08-07-05</Message></Error><RequestId>cfb9771f-8ccd-4ff5-82f5-36e5da694eff</RequestId></ErrorResponse>'
2023-11-08 18:57:36,143 - MainThread - botocore.hooks - DEBUG - Event
needs-retry.rds.CopyDBSnapshot: calling handler <bound method
RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object
at 0x7fbc69317250>>
2023-11-08 18:57:36,143 - MainThread - botocore.retries.standard - DEBUG -
Not retrying request.
2023-11-08 18:57:36,143 - MainThread - botocore.hooks - DEBUG - Event
after-call.rds.CopyDBSnapshot: calling handler <bound method
RetryQuotaChecker.release_retry_quota of
<botocore.retries.standard.RetryQuotaChecker object at 0x7fbc692d9a10>>
2023-11-08 18:57:36,146 - MainThread - awscli.clidriver - DEBUG -
Exception caught in main()
Traceback (most recent call last):
  File "awscli/clidriver.py", line 460, in main
  File "awscli/clidriver.py", line 595, in __call__
  File "awscli/clidriver.py", line 798, in __call__
  File "awscli/clidriver.py", line 929, in invoke
  File "awscli/clidriver.py", line 941, in _make_client_call
  File "awscli/botocore/client.py", line 342, in _api_call
  File "awscli/botocore/client.py", line 701, in _make_api_call
botocore.errorfactory.DBSnapshotNotFoundFault: An error occurred
(DBSnapshotNotFound) when calling the CopyDBSnapshot operation: DBSnapshot
not found: rds:fleet-planner-prod-encrypted-2023-11-08-07-05

An error occurred (DBSnapshotNotFound) when calling the CopyDBSnapshot
operation: DBSnapshot not found:
rds:fleet-planner-prod-encrypted-2023-11-08-07-05```

On Mon, Nov 6, 2023 at 7:14 PM Tim Finnigan ***@***.***>
wrote:

> Hi @darianjd <https://github.com/darianjd> thanks for reaching out.
>
> The CLI modify-db-snapshot-attribute
> <https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/modify-db-snapshot-attribute.html>
> command corresponds to the RDS ModifyDBSnapshotAttribute
> <https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBSnapshotAttribute.html>
> API. The InvalidParameterValue error is returned by the RDS API (for
> reference, it is documented here
> <https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/CommonErrors.html>
> .)
>
> I was not able to reproduce this issue. When I tried to assign a DB
> snapshot identifier in that format, I received the following error
>
> > aws rds create-db-snapshot --db-snapshot-identifier rds:my-snapshot --db-instance-identifier mydbinstance
> >
> > An error occurred (InvalidParameterValue) when calling the CreateDBSnapshot operation: The parameter DBSnapshotIdentifier 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.
>
> I could not modify it that way either:
>
> [image: image]
> <https://user-images.githubusercontent.com/87778557/280878900-aa781edd-523b-4bc0-9bec-eb24870bfac1.png>
>
> So I'm not sure why you saw an identifier returned rds:... prefix. When
> I ran describe-db-snapshots
> <https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-snapshots.html>
> and describe-db-snapshot-attributes
> <https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-snapshot-attributes.html>
> after assigning an identifer my-snapshot, it does not prepend that value
> with rds* in the response:
> ------------------------------
>
> [image: image]
> <https://user-images.githubusercontent.com/87778557/280878203-63d9883d-c5de-4ccf-9706-6087996b9835.png>
>
> Did you assign your DB snapshot identifer in the console with the rds:*
> prefix? Or do you have any code modifications or third-party software that
> could be adding that? If you could share your debug logs (with any
> sensitive info redacted) by adding --debug to the command, that might
> help provide more insight.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/aws/aws-cli/issues/8296#issuecomment-1797066587>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AC4P6SCGLWKHUWQRPDIAGCTYDF4MZAVCNFSM6AAAAAA64QU636VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJXGA3DMNJYG4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>

--
*Darian DeFalco*
*Staff Site Reliability Engineer*
<https://transfix.io/>

Website
<https://transfix.io/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=website>
| LinkedIn
<https://www.linkedin.com/company/transfixio/posts/?feedView=all> |
Facebook <https://www.facebook.com/transfixIO>

Data. Driven.
<https://transfix.io/team/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=people>Market
Insights <https://transfix.io/insights>

Purpose. Driven. Annual ESG Report
<https://transfix.io/sustainability/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=esg_report>

Career. Driven. View Our Careers Page
<https://transfix.io/company/careers/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=careers>

-- Darian DeFalco Staff Site Reliability Engineer https://transfix.io/

Website https://transfix.io/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=website | LinkedIn https://www.linkedin.com/company/transfixio/posts/?feedView=all | Facebook https://www.facebook.com/transfixIO

Data. Driven. https://transfix.io/team/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=peopleMarket Insights https://transfix.io/insights

Purpose. Driven. Annual ESG Report https://transfix.io/sustainability/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=esg_report

Career. Driven. View Our Careers Page https://transfix.io/company/careers/?utm_campaign=Employee%2520Email%2520Signature&utm_source=employee_signature&utm_medium=email&utm_content=careers

-- This message may contain confidential and privileged information.  If it has been sent to you in error, please reply to advise the sender of the error and then immediately delete this message.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.