dynobase-icon
Dynobase

Question: Can colons and special characters be used in DynamoDB attributes?

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Answer

Yes. DynamoDB attribute names can contain colons, dots, spaces and other special characters. The restricted character list for table names does not apply to attribute names.

The catch is expression syntax. A dot normally separates document-path components, # introduces an attribute-name placeholder and : introduces a value placeholder. Use ExpressionAttributeNames to reference a literal name that would otherwise be ambiguous:

aws dynamodb get-item --table-name Products \ --key '{"pk":{"S":"product-123"}}' \ --projection-expression '#field' \ --expression-attribute-names '{"#field":"spec:color.primary"}'

Here the entire string spec:color.primary is one attribute name. To read a nested primary field inside a map instead, alias the individual path components and join the aliases with a dot.

The same technique handles reserved words and names that start with a digit. Placeholder names have their own syntax, so use simple aliases such as #field; do not copy punctuation from the actual name into the alias.

Prefer short, readable names when you control the schema, but there is no need to rename existing attributes merely because they contain punctuation. See naming conventions and the reserved-word checker.

Source: AWS expression attribute names.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.