I have 20 tables in aws dynomodb.and everything was working very fine. but now it's not working and taking too much time for fetching data. I am not able to figure out where is the problem.
if the problem in my code then: Before it was working very fine I have not changed anything in the code.
if problem in dynamodb then: mobile side dynamodb queries working fine.as it was working for me. both mobile and website using the same database.
if the problem on my server then: after facing this problem I have created new instance.i have taken ubuntu, now everything working very fine expect dynamodb.
here I have placed a demo code that how I was getting data from dynamodb table.
require 'vendor/autoload.php';
use Aws\Common\Aws;
use Aws\DynamoDb\DynamoDbClient;
$aws = Aws::factory ( '/var/www/html/jackpot/id.php' );
$client = $aws->get ( 'DynamoDb' );
$iterator = $client->getIterator ( 'Scan', array (
'TableName' => 'iqjackpot-mobilehub-352703280-counter'
) );
foreach($iterator as $item){
$totalTicket = (int) $item['totalTickets']['N'];
$counterIds = (int) $item['counterId']['N']+1;
}
echo $totalTicket;
die;
I don't know what I am doing wrong and what to do now.i have been spent 2 days on this.if someone helps me, I will be very very thankful.