More than often DynamoDB Local does not show descriptive error messages, in order to see internal errors you need to enable logging.
What are the steps to enable DynamoDB Local logging on the standard output?
Logging and Monitoring in DynamoDB. Monitoring is an important part of maintaining the reliability, availability, and performance of DynamoDB and your AWS solutions. You should collect monitoring data from all parts of your AWS solution so that you can more easily debug a multi-point failure, if one occurs.
To access DynamoDB running locally with the AWS CLI (Command Line Interface), use the –endpoint-url parameter. For example, use the following command to list DynamoDB tables. aws dynamodb list-tables --endpoint-url http://localhost:8000 Now your local installation is all set and you can start building your application.
Accessing DynamoDB. You can access Amazon DynamoDB using the AWS Management Console, the AWS Command Line Interface (AWS CLI), or the DynamoDB API.
Under the hood, it will simply spin a Java process with a copy of Java-based local DynamoDB. All you need to do, is to tell the DynamoDB or DocumentClient to use the local endpoint in the constructor. func main() { sess, err := session.NewSession(& aws.
Create a new file called log4j.properties with the contents:
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=LOG%d %p [%c] - %m%n
Remove the existing log4j.properties files from the jar (there might be two)
zip -d DynamoDBLocal.jar log4j.properties
zip -d DynamoDBLocal.jar log4j.properties
Add the new properties file to the jar
zip -u DynamoDBLocal.jar log4j.properties
Source: https://gist.github.com/mdaley/aaf9b62d90f6817eb72a
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With