aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 53 forks source link

AWS::DynamoDB::Table - RestoreArn #83

Open lwoggardner opened 4 years ago

lwoggardner commented 4 years ago

1. AWS::DynamoDB::Table-RestoreArn

2. Scope of request

AWS::DynamoDB::Table supports PointInTimeRecoverySpecification but it is not possible to gain control of a restored table via Cloudformation.

3. Expected behavior

It should behave similarly to EBS and RDS restores from SnapshotIds

In Create, it should validate the properties of the RestoreArn (DescribeBackup) are compatible with the other cloudformation properties of the table,, and then create a new table using RestoreTableFromBackup. After the restore is complete, the table should be updated to the new property specifications as per a normal Update.

Updating the RestoreArn attribute should cause Replacement.

4. Suggest specific test cases

Standard case Create.

Should Create successfully, via call to RestoreTableFromBackup.

Standard case Update.

Should Update successfully, creating a new table via RestoreTableFromBackup and deleting the old table (normal replacement behaviuor).

Uncommon case. Restore with Change to TableName

should succeed

Uncommon case. Restore with valid Changes

In addition to RestoreArn, also add GlobalSecondaryIndexes, change other "no interruption properties) BillingMode, Capacity, Streams,Tags, TTL - should behave as though create with the restore specification and immediately update with other properties.

should succeed.

Failure case. RestoreArn set with TableName unchanged.

Since restoreArn required replacement, updating it without changing an explicitly set TableName should fail.

Failure case. Restore with other "replacement changes" - should fail.

Set LocalSecondaryIndexes, AttributeDefinitions, KeySchema to be different from those in the backup. Expect failure to create, or update before any call to RestoreBackup is made.

5. Helpful Links to speed up research and evaluation

https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeBackup.html https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_RestoreTableFromBackup.html

6. Category (required) - DB

PatMyron commented 4 years ago

CloudFormation resource import supports AWS::DynamoDB::Table, so restored tables can now be CloudFormation-managed

lwoggardner commented 4 years ago

I am happy there is now a possibility to acheive the outcome via import resources. However, here is what I think is required to implement this using the new import feature via automation.

That work and complexity (heavy lifting) should not have to be done by every customer when it could be implemented once and encapsulated in a property like it is for ebs and rds.

Gtofig commented 1 year ago

Any update on this? I think the restore story for DynamoDB tables managed via CFN/CDK is still overly complex.

jakedaleweb commented 1 year ago

+1 we would like this too so our RDS and Dynamo restoration strategies can match

nepalibidur14 commented 4 months ago

+1 Any updates will be highly appreciated.