microservices-patterns / ftgo-application

Example code for the book Microservice patterns
Other
3.41k stars 1.32k forks source link

How Order History Service works without AWS account and how to see DB changes? #54

Closed asn25 closed 4 years ago

asn25 commented 4 years ago

Hello,

I'm exploring EntToEndTests. It passes OK. It has a part "verifyOrderHistoryUpdated(int orderId, int consumerId)" - it seems it passes OK as well. Questions:

1) How it works without AWS account? DynamoDB is AWS service. As of my experience with AWS, you need to create account to use AWS services...

2) How could one check updates in DynamoDB? F.e. I can see updates in MySQL schemas of main services in IntelliJ IDEA using MySQL Datasource in "Database"-tab. How should one configure DynamoDB connection, what should be connection properties (user, password, schema?) and what tool is appropriate to see DB changes?

Thanks, Andrew

cer commented 4 years ago

The application uses https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html

There are two containers:

You can access DynamoDB tables using the AWS CLI:

export AWS_ACCESS_KEY_ID=id_key AWS_SECRET_ACCESS_KEY=access_key
aws --region ignored --endpoint-url http://$DOCKER_HOST_IP:8000 dynamodb scan --table-name ftgo-order-history