(InvalidParameterValue) CopyDBClusterSnapshot operation: PreSignedUrl could not be authenticated while copying encrypted cluster cross region

Viewed 13

Can anyone please review this code snippet and explain what is missing? According to the official documentation, we just need to add source_region which automatically creates the URL. But that fails with the same error. So, I have added a code to generate the url and then call the copy_db_cluster_snapshot but no luck with the error.

dest_rds_client = boto3.client('rds', region_name='eu-central-1')
pre_signed_url = dest_rds_client.generate_presigned_url\
            ('copy_db_cluster_snapshot', Params={'KmsKeyId': key,
                                                 'SourceDBClusterSnapshotIdentifier':'test',
                                                 'TargetDBClusterSnapshotIdentifier':'test',
                                                 'SourceRegion': 'us-west-2'},
             ExpiresIn=1000)
dest_rds_client.copy_db_cluster_snapshot(SourceDBClusterSnapshotIdentifier='test',
                                                     TargetDBClusterSnapshotIdentifier='test',
                                                     KmsKeyId=key,
                                                     PreSignedUrl=pre_signed_url)
0 Answers
Related