Resource ARN mismatch during Point-in-Time Recovery (PITR) restore
0 reputation · 28 Mar 2026, 09:48 UTC
0 reputation · 28 Mar 2026, 09:48 UTC
Amazon DynamoDB Point-in-Time Recovery (PITR) allows for the restoration of table data to a specific timestamp within a 35-day window. However, the restoration process creates a completely new table with a unique Amazon Resource Name (ARN) rather than restoring data into the existing table structure.
In environments where application configurations, IAM policies, or CloudFormation stacks are tightly coupled to a specific table ARN, this behavior introduces a synchronization gap. Since the original table remains intact and the restored table is a separate entity, the application must be manually or programmatically updated to point to the new resource.
To manage the transition to a new restored table ARN without downtime, you must decouple your application from specific resource identifiers using environment variables or AWS Systems Manager (SSM) Parameter Store. Because DynamoDB PITR always creates a new table with a unique ARN, you cannot "overwrite" the existing resource; you must redirect the application to the new target.
The most effective way to avoid downtime is to implement a dynamic configuration lookup rather than hardcoding ARNs in your application code or IAM policies. Follow these steps:
/prod/app/dynamodb-table-arn).Table_Restored_2026-10-04).There is no native AWS feature to "transfer" an IAM policy association from a source table to a restored table because the ARN is the unique identifier. To maintain consistency, use IAM Resource Wildcards or Tags:
AppTable_), define your IAM policy resource as arn:aws:dynamodb:region:account-id:table/AppTable_*. This ensures any restored table following the prefix is automatically covered.Environment: Production. When you restore the table, ensure the restoration process or a post-restore script applies the required tags.Before switching traffic, verify the new ARN and permissions using the AWS CLI:
# Verify the new table ARN
aws dynamodb describe-table --table-name YourRestoredTableName
# Test IAM permissions with the restored ARN
aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::account-id:role/AppRole --action-names dynamodb:GetItem --resource-arns arn:aws:dynamodb:region:account-id:table/YourRestoredTableName
Diagnostic Detail Needed: Are you using a specific Infrastructure-as-Code (IaC) tool like Terraform or CloudFormation to manage these policies? If so, the recommendation shifts toward updating the stack parameters rather than manual SSM updates.
Use comments to ask for clarification. Post a solution as an answer.
35,275 reputation · 28 Mar 2026, 19:24 UTC
Instead of relying on a wildcard ARN, you can attach an IAM policy that uses the dynamodb:TableName condition key to allow actions on any table with a specific name, e.g.:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["dynamodb:GetItem","dynamodb:PutItem","dynamodb:UpdateItem","dynamodb:DeleteItem"],
"Resource": "arn:aws:dynamodb:*:*:table/*",
"Condition": {
"StringEquals": {
"dynamodb:TableName": "MyAppTable"
}
}
}]
}
This approach keeps the policy ARN‑agnostic while still scoping permissions to a single logical table name. Remember that the condition only works if no other table in the same account/region shares that exact name; otherwise you unintentionally grant broader access. After a PITR restore, you must also re‑enable point‑in‑time recovery, copy tags, and restore any TTL or stream settings, as those are not inherited by the new table.