serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

AWS::Serverless::SimpleTable - PointInTimeRecovery

Open dave-graham opened this issue 6 years ago • 1 comments

Hey,

I think this would be a simple addition.

Can we add PointInTimeRecovery to simple table.

The cloud formation equivalent would be:

PointInTimeRecoverySpecification: PointInTimeRecoveryEnabled: true

I'm happy to pick this up if you think it's a good idea, if you can point me in the right direction, but may not be able to pick up for a week or two.

I think it would be good to default on, but don't mind if its defaulted off.

Storage is cheap in dynamo, so shouldn't cost a lot, and enterprise level customers can turn off if they want.

But there is so much scope for a dev to overlook a tiny detail and end up wiping data that shouldn't be wiped, so not having a backup would be a problem.

dave-graham avatar Dec 11 '18 16:12 dave-graham

This would be a good addition to SimpleTable, thanks! For backward compatibility reasons, we can't default it to true, but we can add it into SimpleTable to make it easier to turn on.

SimpleTable: add PointInTimeRecoveryEnabled option: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/sam_resources.py#L476

DynamoDB: add PointInTimeREcoverySpecification option: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/sam_resources.py#L476

Construct the object dictionary and pass it to the DynamoDB object: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/sam_resources.py#L494

Then go ahead and update tests as needed.

keetonian avatar Dec 12 '18 18:12 keetonian

Hi @keetonian @dave-graham, was this ever added?

ImreC avatar May 01 '23 07:05 ImreC

Hi @keetonian @dave-graham, was this ever added?

It wasn't before you mentioned it, thanks.

I've added support for it in https://github.com/aws/serverless-application-model/pull/3138; it'll roll out over the coming weeks.

hoffa avatar May 01 '23 17:05 hoffa

Awesome @hoffa! Thanks!

ImreC avatar May 03 '23 08:05 ImreC