Error: dynamodb property projection cannot be empty

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
“Property projection cannot be empty” requires checking which projection is involved. A read’s ProjectionExpression must not be an empty string if supplied, but it is optional. A secondary index’s Projection is a separate schema object with a ProjectionType setting.
For a read, omit ProjectionExpression to return all available attributes, or provide a comma-separated list of names. Aliases handle reserved words and special characters:
import boto3
db = boto3.client("dynamodb", region_name="us-west-2")
page = db.scan(
TableName="Orders",
ProjectionExpression="#pk, #status",
ExpressionAttributeNames={"#pk": "pk", "#status": "status"},
)
print(page.get("Items", []))This reads one page; follow LastEvaluatedKey for more. For simple names, a projection such as pk, sk is also valid. Missing projected attributes are omitted from results rather than created.
If the error comes from CreateTable, UpdateTable, or CloudFormation, configure the index ProjectionType as KEYS_ONLY, ALL, or INCLUDE. INCLUDE requires the intended NonKeyAttributes; do not provide an empty projection object or confuse it with ProjectionExpression.
See index projections and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- DynamoDB ConditionalCheckFailedException
- DynamoDB stream not working
- DynamoDB ConditionExpression not working
- accessdeniedexception dynamodb
- DynamoDB type is not supported
- dynamodb the parameter cannot be converted to a numeric value NaN
- requested resource not found aws dynamodb
- AWS CLI DynamoDB Error Parsing Parameter
- DynamoDB Invalid UpdateExpression Syntax Error Token
- DynamoDB Local Cannot Create Preexisting Table
- Error retrieving DynamoDB table item validation exception
- DynamoDB GetItem no item
- name key is not defined dynamodb
- dynamodb-admin is not recognized as an internal or external command
- DynamoDB failedbatch retry
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today