I have a simple DynamoDB on AWS with a table which I can view test data 'Items' from the DynamoDB console also via a standalone client called Dynobase.
Now I want to create a simple webpage hosted on Lightsail that contains a HTML table to display the data. I would like to connect to the DynamoDB using PHP then issue a query, tabulating the response.
Can someone point me at an example of how to do this? - The AWS documentation is quite confusing.
This is the code Link to the code I am running on my Lightsail instance. I have added <?php
at the top of the file and ?>
at the bottom. I am testing the code via my web browser xx.xx.xx.xx/MoviesCreateTable.php
This is the error I am getting->
Unable to create table: Error executing "CreateTable" on "http://localhost:8000"; AWS HTTP error: cURL error 7: Failed to connect to localhost port 8000: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:8000
Many Thanks Andy