Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

DynamoDB table scan

New Contributor



I have a dynamodb table and I need to scan this table and I need to use a filter expression. When I run the command from the prompt I receive the result that I want, but when I run the command with ExecuteProcess, I'm having trouble with the expression-attribute-values parameter.


When I run the command I receive the following error:




Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: :value', =






aws dynamodb scan --table-name myTable --filter-expression "url = :value" --expression-attribute-values '{":value":{"S":""}}'





My processor configuration :



Anyone could help me?


New Contributor

I did a workaround and run this command using a bash script. When I try to send this json as a parameter I had the same error. I imagine that is not a problem from Nifi, but something related to passing a json to a bash script. In my processor I run the script and as parameter the name of my function and the url to search. To solve the problem of the json I create a temporary file with the data. 


FILTER_EXPRESSION="url = :value"

endpoint () {
    echo $EXPRESSION_ATTR > /tmp/expression.json
    aws dynamodb scan --table-name $TABLE \
    --filter-expression "$FILTER_EXPRESSION" \
    --expression-attribute-values file:///tmp/expression.json \
    rm -f /tmp/expression.json