-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(dynamodb): Failure while enabling replication on large tables #22253
Comments
Can you see in your CloudTrail logs if there's more information surrounding the AccessDeniedException? Also, are you using temporary credentials to deploy? |
Thanks @peterwoodworth for pointing me towards CloudTrail logs. The actual root cause seems to be the following error in {
"errorType": "Error",
"errorMessage":
{
"RequestType": "Create",
"ServiceToken": "arn:aws:lambda:us-west-2:XXXXYYYYZZZZ:function:test-stack-2021-10--ProviderframeworkonEvent-FmemwZsY0uPP",
"ResponseURL": "https://cloudformation-custom-resource-response-uswest2.s3-us-west-2.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-west-2%3AXXXXYYYYZZZZ%3Astack/test-stack/18b70370-15af-11ec-865b-0263b279d39f%7Ctimeseries202110TableReplicauseast18D7A00EA%7C2360a976-32ee-4bd5-bcc7-fe9452362c98?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220929T091355Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=AKIA54RCMT6SIEFTRIP7%2F20220929%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=8bc584476d903c030767a96046d32e57b9b789d6248a66f5ebca6b810a2a6dbf",
"StackId": "arn:aws:cloudformation:us-west-2:XXXXYYYYZZZZ:stack/test-stack/18b70370-15af-11ec-865b-0263b279d39f",
"RequestId": "2360a976-32ee-4bd5-bcc7-fe9452362c98",
"LogicalResourceId": "teststackTableReplicauseast18D7A00EA",
"ResourceType": "Custom::DynamoDBReplica",
"ResourceProperties":
{
"ServiceToken": "arn:aws:lambda:us-west-2:XXXXYYYYZZZZ:function:test-stack--ProviderframeworkonEvent-FmemwZsY0uPP",
"TableName": "test-stack",
"Region": "us-east-1"
},
"PhysicalResourceId": "test-stack-us-east-1"
},
"stack":
[
"Error: {\"RequestType\":\"Create\",\"ServiceToken\":\"arn:aws:lambda:us-west-2:XXXXYYYYZZZZ:function:test-stack-2021-10--ProviderframeworkonEvent-FmemwZsY0uPP\",\"ResponseURL\":\"https://cloudformation-custom-resource-response-uswest2.s3-us-west-2.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-west-2%3AXXXXYYYYZZZZ%3Astack/test-stack/18b70370-15af-11ec-865b-0263b279d39f%7Ctimeseries202110TableReplicauseast18D7A00EA%7C2360a976-32ee-4bd5-bcc7-fe9452362c98?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220929T091355Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Credential=AKIA54RCMT6SIEFTRIP7%2F20220929%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=8bc584476d903c030767a96046d32e57b9b789d6248a66f5ebca6b810a2a6dbf\",\"StackId\":\"arn:aws:cloudformation:us-west-2:XXXXYYYYZZZZ:stack/test-stack/18b70370-15af-11ec-865b-0263b279d39f\",\"RequestId\":\"2360a976-32ee-4bd5-bcc7-fe9452362c98\",\"LogicalResourceId\":\"teststackTableReplicauseast18D7A00EA\",\"ResourceType\":\"Custom::DynamoDBReplica\",\"ResourceProperties\":{\"ServiceToken\":\"arn:aws:lambda:us-west-2:XXXXYYYYZZZZ:function:test-stack--ProviderframeworkonEvent-FmemwZsY0uPP\",\"TableName\":\"test-stack\",\"Region\":\"us-east-1\"},\"PhysicalResourceId\":\"test-stack-us-east-1\"}",
" at isComplete (/var/task/framework.js:53:15)",
" at processTicksAndRejections (internal/process/task_queues.js:95:5)",
" at async Runtime.handler (/var/task/cfn-response.js:48:13)"
]
} Hypothesis - Perhaps Cloudformation waits for an hour for the custom resource provider framework lambda to respond back via the signed S3 URL, if no response is returned then the following error surfaces -
Cloudformation Custom Resource Documentation, but couldn't find anything to validate the above hypothesis. For smaller tables also Not sure how to further debug this issue. Any pointers would be appreciated. |
We also encountered this issue. Thanks for the debugging tips. The problem is still unresolved and our production stack is now stuck in |
We also encountered this issue for very small tables (fewer than 1000 items). The problem was not reproducible on other almost-identical environments. |
Hi, thank you for submitting the issue. Will post updates as they become available. |
This issue was for the existing Instead, the Be aware that there are additional deployment steps involved in a migration from Here are some other resources to get you started (using
|
@rix0rrr is there any migration guide available? (from Table to TableV2) |
Describe the bug
While enabling the cross region replication for an existing DynamoDB table containing more than 50GB data, CDK deployment errors out after an hour with the following error message -
I first checked the
OnEventHandler
lambda logs (as suggested in the above error log). These logs just had the following error while trying to rollback the changes done -However, the
isCompleteHandlerService
lambda logs had the following peculiarAccessDeniedException
-When the deployment starts I have verified that the
isCompleteHandlerService
lambda has a corresponding IAM role granting it permissions toDescribeTable
and it is able to get the table description the first time when it starts as well.Cloudwatch logs below -
However, the above error surfaces if the creation of the cross-region replica takes more than 1 hour.
Haven't been able to figure out why the permissions error is thrown after an hour of working fine.
NOTE - For smaller tables, enabling replication is successful.
Expected Behavior
Cross region replica should be successfully created irrespective of the size of the data it contains inline with the manual creation of a replica via the console.
Current Behavior
For smaller tables(containing less than 10GB), enabling replication via CDK is successful.
But for large sized tables, enabling replication via CDK deploy fails with the following error -
Reproduction Steps
NOTE - CDK 1.174.0 was used to deploy the above CDK stack.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
1.174.0
Framework Version
No response
Node.js Version
v14.17.1
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: