0

We're getting this response for some requests to dynamodb:

{
        "type": "Error",
        "message": "Internal server error",
        "stack": "InternalServerError: Internal server error\n    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)\n    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)\n    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\n    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)\n    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)\n    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)\n    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10\n    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)\n    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:688:12)\n    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)",
        "code": "InternalServerError",
        "time": "2022-07-29T12:06:33.648Z",
        "requestId": "G0UIJLLB6QA2PMHORNFSHQQV4RVV4KQNSO5AEMVJF66Q9ASUAAJG",
        "statusCode": 500,
        "retryable": true
    },

This isn't consistent however, some of the requests go through fine, others timeout and then we get this error once in a while. The lambda is inside a VPC but I doubt it's an issue with that as some of the requests are going to Dynamodb just fine.

Has anyone else encountered this issue?

1

1 Answer 1

1

It happens for many reasons. As one example, when new capacity (partitions) are being added to a table there's a cutover moment from old to new where you'll see this for a short period of time. It's a retryable exception. You should have your code retry and it will generally succeed in short order.

You can track how frequently it happens in CloudWatch. If it's really common and not just intermittent, that's more interesting.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.