Error: dynamodb is abstract cannot be instantiated

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
“Is abstract; cannot be instantiated” is a language or client-library error, not a DynamoDB service response. In Java, a service interface such as DynamoDbClient cannot be created with new. Use its builder. If the error names your model class, fix that model instead.
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
DynamoDbClient client = DynamoDbClient.builder()
.region(Region.US_WEST_2)
.build();Reuse the client and close it when the application no longer needs it. Legacy AmazonDynamoDB belongs to Java SDK 1.x; migrate to the Java 2.x interface and builder rather than mixing packages.
For mapper errors, choose a concrete mapped type. A mutable Enhanced Client bean needs a public no-argument constructor and appropriate accessors; an immutable model needs its supported builder mapping. In Python, the normal factories are boto3.client("dynamodb") and boto3.resource("dynamodb"), but a Java compiler error is not fixed by a Python example.
See Java client examples and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- why is the GSI dynamodb not showing item count
- DynamoDB ConditionExpression not working
- DynamoDB missing items
- DynamoDB Is Not Null
- dynamodb could not load credentials from any providers
- dynamodb list_append if_not_exists not working
- a bytes-like object is required not binary dynamodb
- boto3 dynamodb unable to locate credentials
- Boto3 DynamoDB KeyError
- name key is not defined dynamodb
- moto dynamodb not working
- dynamodb cannot read properties of undefined
- dynamodb the parameter cannot be converted to a numeric value NaN
- DynamoDB attribute not empty
- KMS Key Access Denied Error DynamoDB
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today