我正在使用Amazon Elastic beanstalk并运行php服务器。简单的应用程序运行正常但是每当我尝试连接到AWS DynamoDB时,它都会给我错误
被禁止
您无权访问此服务器上的/。
下面是代码
<?php
require 'aws/aws-autoloader.php';
require 'config.php';
date_default_timezone_set('America/New_York');
use Aws\DynamoDb\DynamoDbClient;
$client = DynamoDbClient::factory($config);
$result = $client->describeTable(array(
'TableName' => 'abcmsg'
));
echo 'Result is ', $result;
?>
不确定我是否需要设置一些IAM角色,但是这些是什么以及在哪里需要?