By using AWS re:Post, you agree to the Terms of Use

Reason for providing the 'source-dbi-resource-id' parameter in the AWS RDS CLI command 'restore-db-instance-to-point-in-time'?



I have come across the parameter 'source-dbi-resource-id' in the AWS CLI command for **Point-in-Time Restore **of RDS DB instances. The parameter accepts the Resource ID of the DB instance which acts as the source for Point-in-Time restore.

Can someone let me know why this parameter exists in the CLI command/AWS API, since it is always possible to refer to the source DB instance using the parameter 'source-db-instance-identifier'. Does the 'source-dbi-resource-id' parameter serve a special use-case that is otherwise not possible using the instance identifier?


References -

  1. AWS CLI command 'restore-db-instance-to-point-in-time' :

  2. AWS REST API documentation for RestoreDBInstanceToPointInTime :

asked 8 months ago42 views
1 Answer

Hi there, You mention that you would like to know the difference between "source-dbi-resource-id" and "source-db-instance-identifier" in AWS CLI point in time restore.

With that being said, on the command line interface is where you would use the “source-db-instance-identifier” to get a point in time restore on an existing resource. Where as the command “source-dpi-resource-id” is used to restore your instance to a specific point in time whether your instance is deleted or not. So the main difference is that you are able to restore to a point in time with the "source-db-instance-identifier” command and with the "source-dbi-resource-id" command you may take it a step further and restore from a deleted instance and not just an existing one.

You could also perform test cases for the two commands which helps better understand the differences:

For the identifier restore command you may run the command on an existing DB and restore it to a specific point in time:

aws rds restore-db-instance-to-point-in-time \
    --source-db-instance-identifier test-instance \
    --target-db-instance restored-test-instance \
    --restore-time 2018-07-30T23:45:00.000Z

For the resource ID command,delete your instance and from an automated back up you may restore it to a point in time:

aws rds restore-db-instance-to-point-in-time \
--source-dbi-resource-id db-SFYEN53K4FSUXXXXXXXXX \
--target-db-instance restored-after-delete \
--restore-time 2018-07-30T23:45:00.000Z
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions