How do I search by attribute in DynamoDB?
I contacted AWS support, and they said two things:

The read/write capacity of the table needed to be changed from &quot;provisioned&quot; to &quot;on-demand&quot;.

Scan is definitely the command to use here, not query; query requires the id, scan does not.
aws dynamodb scan --table-name users --filter-expression &quot;Username = :v1&quot; 
    --expression-attribute-values &quot;{ \&quot;:v1\&quot; : { \&quot;S\&quot; : \&quot;example\&quot; } }&quot;