• About Us
  • Contact Us
  • Advertise
  • Privacy Policy
  • Guest Post
No Result
View All Result
Digital Phablet
  • Home
  • NewsLatest
  • Technology
    • Education Tech
    • Home Tech
    • Office Tech
    • Fintech
    • Digital Marketing
  • Social Media
  • Gaming
  • Smartphones
  • AI
  • Reviews
  • Interesting
  • How To
  • Home
  • NewsLatest
  • Technology
    • Education Tech
    • Home Tech
    • Office Tech
    • Fintech
    • Digital Marketing
  • Social Media
  • Gaming
  • Smartphones
  • AI
  • Reviews
  • Interesting
  • How To
No Result
View All Result
Digital Phablet
No Result
View All Result

Home » How to Recover Lost Data from AWS CloudFormation SAM Deletion of DynamoDB Table

How to Recover Lost Data from AWS CloudFormation SAM Deletion of DynamoDB Table

Emily Smith byEmily Smith
November 1, 2025
inHow To
Reading Time: 2 mins read
AA
How to Set Up Amazon Q Business with QuickSight Using IAM Federation
ADVERTISEMENT

Select Language:

If you’re using AWS SAM and find that a resource like a DynamoDB table gets unexpectedly deleted during deployment, don’t worry—there are steps you can take to prevent this from happening in the future.

ADVERTISEMENT

When you update your template.yaml and remove or omit a resource like a DynamoDB table, CloudFormation assumes you want it deleted unless you tell it otherwise. To keep that resource intact even if it’s not present in your new template, you need to mark the resource as “retained.” This means CloudFormation will ignore it during updates and won’t delete it automatically. You can do this by adding a DeletionPolicy attribute set to “Retain” in your resource definition.

Here’s a quick example:
yaml
Resources:
MyDynamoDBTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
Properties:
TableName: my-shared-table
# other properties

Another reliable way is to import and manage shared resources outside of CloudFormation, then reference them as imported resources in your stacks. This approach helps avoid accidental deletion.

ADVERTISEMENT

For shared resources like DynamoDB tables that multiple stacks rely on, the best practice is to manage them separately from your main application stacks. Use CloudFormation Stack Imports or AWS Resource Import capabilities to reference existing resources without risking deletion. This keeps your shared resources safe and ensures updates won’t delete what others depend on.

Now, about your lost data — unfortunately, without backup or point-in-time recovery enabled on your DynamoDB table, retrieving the lost data might not be possible. If the data is critical, contacting AWS Support could give some options, but often, without backups, the data is unrecoverable.

In the future, enabling Point-In-Time Recovery (PITR) and regular backups can save a lot of trouble if accidental deletions happen again.

Remember, managing shared resources carefully and marking important resources with Retain policies can prevent accidental deletions during updates. Always keep backups, especially for critical production data.

ChatGPT ChatGPT Perplexity AI Perplexity Gemini AI Logo Gemini AI Grok AI Logo Grok AI
Google Banner
ADVERTISEMENT
Emily Smith

Emily Smith

Emily is a digital marketer in Austin, Texas. She enjoys gaming, playing guitar, and dreams of traveling to Japan with her golden retriever, Max.

Related Posts

Asia: The Birthplace of Major Religions
Infotainment

Asia’s Role as the Origin of Major World Religions

November 2, 2025
Kerem Bürsin, Selin Yağcıoğlu, and Mehtap Algül's Love Triangle
Entertainment

Kerem Bürsin, Selin Yağcıoğlu, and Mehtap Algül’s Love Triangle

November 2, 2025
Top 60 Attachments for Completing Challenges in Battlefield 6
Gaming

How to Upgrade Stations in Arc Raiders: Completing and Solving

November 2, 2025
How To

How to Disable Sure Start and Access BIOS During Windows 11 Installation

November 2, 2025
Next Post
How to Contribute to Open Source on GitHub: A Step-by-Step Guide

How to Contribute to Open Source on GitHub: A Step-by-Step Guide

  • About Us
  • Contact Us
  • Advertise
  • Privacy Policy
  • Guest Post

© 2025 Digital Phablet

No Result
View All Result
  • Home
  • News
  • Technology
    • Education Tech
    • Home Tech
    • Office Tech
    • Fintech
    • Digital Marketing
  • Social Media
  • Gaming
  • Smartphones

© 2025 Digital Phablet