aws-samples / aws-modern-application-workshop

A tutorial for developers that want to learn about how to build modern applications on top of AWS. You will build a sample website that leverages infrastructure as code, containers, serverless code functions, CI/CD, and more.
Apache License 2.0
1.46k stars 832 forks source link

Module 3 batch-write-item Issue #255

Closed Ken501 closed 11 months ago

Ken501 commented 3 years ago

Currently trying to add the populate-dynamodb.json to the table I created in DynamoDB. For context I am running this project locally on my machine from studio code. I am using the following command:

Input:

aws dynamodb batch-write-item --region us-east-1 --request-items file://b:/'cloned repos'/module-3/aws-cli/populate-dynamodb.json

Output:

Error parsing parameter '--request-items': Unable to load paramfile (b:/cloned repos/module-3/aws-cli/populate-dynamodb.json), text contents could not be decoded. If this is a binary file, please use the fileb:// prefix instead of the file:// prefix.

When I apply the recommended fix above and run the CLI again I get the following:

Input:

aws dynamodb batch-write-item --region us-east-1 --request-items fileb://b:/'cloned repos'/module-3/aws-cli/populate-dynamodb.json

Output:

'in ' requires string as left operand, not int

I have not done any changes to the populate-dynamodb.json

cesammaz commented 3 years ago

from within the "cdk" root folder, I did:

aws dynamodb batch-write-item --request-items file://../source/module-3/data/populate-dynamodb.json

you have an issue with your relative path.