无法将aws快照复制到另一个区域javascript

时间:2018-06-15 06:27:29

标签: javascript rds aws-sdk-js

无法将快照复制到另一个区域,但在同一区域工作正常。

let url = 'https://rds.us-west-1.amazonaws.com/?Action=CopyDBSnapshot?SourceDBSnapshotIdentifier=${snapshot.DBSnapshotArn},?DestinationRegion=us-west-1?KmsKeyId=KmsKeyId?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=access-key/${date}/us-west-1/rds/aws4_request&X-Amz-Date=${datetime}&X-Amz-Expires=86400&X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date&X-Amz-Signature=somevalue';

let copyparams = {
    SourceDBSnapshotIdentifier: snapshot.DBSnapshotArn,
    TargetDBSnapshotIdentifier: snapshotname,
    CopyTags: true,
    SourceRegion: 'us-east-1',
    PreSignedUrl: url
};

rds.copyDBSnapshot(copyparams, function(err, result) {
    if (err) {
        console.log(err);
    } else {
        console.log(result);
    }
});

0 个答案:

没有答案