Home > Software engineering >  AWS CLI PartiQL INSERT statement returns "ExecuteStatement operation: Requested resource not fo
AWS CLI PartiQL INSERT statement returns "ExecuteStatement operation: Requested resource not fo

Time:08-29

I'm following the instructions in the enter image description here

Then, I tried to run the below statement:

aws dynamodb execute-statement  --statement "INSERT INTO resourcelock VALUE {'resourceName':'dev', 'resourceType':'environment'}"  --profile free

Which gave me the error:

An error occurred (ResourceNotFoundException) when calling the ExecuteStatement operation: Requested resource not found

I've tried a number of variations on the syntax but I can't seem to get it to work from the cli.

I can add items via the AWS Console so not sure what's wrong.

enter image description here

CodePudding user response:

A table is created with the name resourceLock (upper-case L), but the execute-statement command is using resourcelock (lower-case L).

Table names are case-sensitive in DynamoDB, so this should work:

aws dynamodb execute-statement  --statement "INSERT INTO resourceLock VALUE {'resourceName':'dev', 'resourceType':'environment'}"  --profile free
  • Related