前提・実現したいこと
javascriptやAWSについては、全くの初心者です。
教えてください、よろしくお願いします。
AWSのDynamoDBに JavaScriptでアクセスしたいのですが、エラーです。
function自体の書き方は間違っていないと思うのですが、
エラーの原因がどこなのかが分かりません。
発生している問題・エラーメッセージ
下記がChromeのデバック画面での表示です。
エラーメッセージ 1 The SSL certificate used to load resources from https://dynamodb.ap-northeast-1.amazonaws.com will be distrusted in M70. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information. aws-sdk-2.212.1.min.js:47 POST https://dynamodb.ap-northeast-1.amazonaws.com/ 400 (Bad Request) handleRequest 1-2
該当のソースコード
Javascript
1<!DOCTYPE html> 2 3<html> 4<head> 5 <script src="https://sdk.amazonaws.com/js/aws-sdk-2.212.1.min.js"></script> 6<script type="text/javascript"> 7 8AWS.config.update({ 9 region: "ap-northeast-1", 10 endpoint: "https://dynamodb.ap-northeast-1.amazonaws.com", 11 accessKeyId: "[MY_AccessKey]", 12 secretAccessKey: "[My_SecretAccessKey]" 13}); 14 15var dynamodb = new AWS.DynamoDB(); 16var docClient = new AWS.DynamoDB.DocumentClient(); 17console.log("0"); 18</script> 19</head> 20 21<body> 22<script> 23 24var params = { 25 TableName: 'IoT_test1', 26 ExpressionAttributeNames:{ "#y": "year" }, 27 ExpressionAttributeValues:{':val': 1980}, 28 KeyConditionExpression: '#yr >= :val'//検索対象が満たすべき条件を指定 29}; 30console.log("1"); 31docClient.query(params, function(err, data){ 32 if(err){ 33 console.log("1-2"); 34 console.log(err); 35 }else{ 36 console.log("1-3"); 37 data.Items.forEach(function(person, index){ 38 console.log(person.name);//1980年以前の受賞者の名前 39 }); 40 } 41}); 42</script> 43</body> 44
試したこと
下記項目は、何度も確認したので、間違いないです。
region: "ap-northeast-1",
endpoint: "dynamodb.ap-northeast-1.amazonaws.com",
accessKeyId: "[MY_AccessKey]",
secretAccessKey: "[My_SecretAccessKey]"
補足情報(FW/ツールのバージョンなど)
テーブルには、既にデータが入っていることは、webアクセスで確認しています。

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/17 07:26
2018/04/18 08:12
退会済みユーザー
2018/04/18 08:32 編集
2018/04/18 08:46
退会済みユーザー
2018/04/18 09:01
2018/04/18 09:20
退会済みユーザー
2018/04/18 09:32
2018/04/19 08:35
退会済みユーザー
2018/04/19 09:28