{"id":2211,"date":"2021-10-22T19:19:38","date_gmt":"2021-10-22T10:19:38","guid":{"rendered":"https:\/\/dennie.tokyo\/it\/?p=2211"},"modified":"2022-03-21T15:24:02","modified_gmt":"2022-03-21T06:24:02","slug":"%e3%80%90dynamodb%e3%80%91aws-lambda-%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f-dynamodb-%e3%83%86%e3%83%bc%e3%83%96%e3%83%ab%e6%a7%8b%e6%88%90%e3%81%ae%e7%a2%ba%e8%aa%8d","status":"publish","type":"post","link":"https:\/\/dennie.tokyo\/it\/?p=2211","title":{"rendered":"\u3010DynamoDB\u3011AWS Lambda \u3092\u4f7f\u7528\u3057\u305f DynamoDB \u30c6\u30fc\u30d6\u30eb\u69cb\u6210\u306e\u78ba\u8a8d"},"content":{"rendered":"\n<p>\u524d\u56de\u306fDynamoDB\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u524d\u63d0<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=2187\" rel=\"noopener\" target=\"_blank\">\u3010DynamoDB\u3011AWS Lambda \u3092\u4f7f\u7528\u3057\u305f DynamoDB \u30c6\u30fc\u30d6\u30eb\u4f5c\u6210<\/a><\/p>\n<\/div>\n\n\n\n<p>\u4eca\u56de\u306f\u4f5c\u6210\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u69cb\u6210\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u30c6\u30fc\u30d6\u30eb\u69cb\u6210\u306e\u78ba\u8a8d<\/h1>\n\n\n\n<p>\u30c6\u30fc\u30d6\u30eb\u69cb\u6210\u306e\u78ba\u8a8d\u306b\u306f describeTable \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5185\u5bb9<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>const DynamoDbSetter = require(&quot;.\/DynamoDbSetter&quot;);\n \nmodule.exports = class DynamoDbOperator extends DynamoDbSetter{\n \n    async exec(event) {\n \n        \/\/ \u5b9f\u884c\u5185\u5bb9\n        let params = {\n            TableName : &quot;Musics&quot;,\n        };\n    \n        \/\/ \u5b9f\u884c\n        return await this.dynamodb.describeTable(params).promise();\n \n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9f\u884c\u7d50\u679c<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n    &quot;TableDescription&quot;: {\n        &quot;AttributeDefinitions&quot;: [\n            {\n                &quot;AttributeName&quot;: &quot;id&quot;,\n                &quot;AttributeType&quot;: &quot;N&quot;\n            },\n            {\n                &quot;AttributeName&quot;: &quot;kind&quot;,\n                &quot;AttributeType&quot;: &quot;N&quot;\n            },\n            {\n                &quot;AttributeName&quot;: &quot;name&quot;,\n                &quot;AttributeType&quot;: &quot;S&quot;\n            }\n        ],\n        &quot;TableName&quot;: &quot;weapon&quot;,\n        &quot;KeySchema&quot;: [\n            {\n                &quot;AttributeName&quot;: &quot;name&quot;,\n                &quot;KeyType&quot;: &quot;HASH&quot;\n            },\n            {\n                &quot;AttributeName&quot;: &quot;id&quot;,\n                &quot;KeyType&quot;: &quot;RANGE&quot;\n            }\n        ],\n        &quot;TableStatus&quot;: &quot;CREATING&quot;,\n        &quot;CreationDateTime&quot;: &quot;2021-10-20T10:43:13.259Z&quot;,\n        &quot;ProvisionedThroughput&quot;: {\n            &quot;NumberOfDecreasesToday&quot;: 0,\n            &quot;ReadCapacityUnits&quot;: 10,\n            &quot;WriteCapacityUnits&quot;: 10\n        },\n        &quot;TableSizeBytes&quot;: 0,\n        &quot;ItemCount&quot;: 0,\n        &quot;TableArn&quot;: &quot;arn:aws:dynamodb:ap-northeast-1:081461195071:table\/weapon&quot;,\n        &quot;TableId&quot;: &quot;21b7ecf4-f2fc-422e-a06c-2f38db3d6b2a&quot;,\n        &quot;LocalSecondaryIndexes&quot;: [\n            {\n                &quot;IndexName&quot;: &quot;weapon_kind_LSI&quot;,\n                &quot;KeySchema&quot;: [\n                    {\n                        &quot;AttributeName&quot;: &quot;name&quot;,\n                        &quot;KeyType&quot;: &quot;HASH&quot;\n                    },\n                    {\n                        &quot;AttributeName&quot;: &quot;kind&quot;,\n                        &quot;KeyType&quot;: &quot;RANGE&quot;\n                    }\n                ],\n                &quot;Projection&quot;: {\n                    &quot;ProjectionType&quot;: &quot;ALL&quot;\n                },\n                &quot;IndexSizeBytes&quot;: 0,\n                &quot;ItemCount&quot;: 0,\n                &quot;IndexArn&quot;: &quot;arn:aws:dynamodb:ap-northeast-1:081461195071:table\/weapon\/index\/weapon_kind_LSI&quot;\n            }\n        ]\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<p>\u524d\u56de\u4f5c\u6210\u3057\u305f\u30ed\u30fc\u30ab\u30eb\u30bb\u30ab\u30f3\u30c0\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u306e\u5185\u5bb9\u3082\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<br>\u306a\u304a\u3001\u4eca\u56de\u306f\u30b0\u30ed\u30fc\u30d0\u30eb\u30bb\u30ab\u30f3\u30c0\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u30bb\u30ab\u30f3\u30c0\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u60c5\u5831\u3082 describeTable \u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h1>\n\n\n\n<p>\u6b21\u56de\u306f\u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u3092\u884c\u3044\u307e\u3059\u3002<br>\u30b0\u30ed\u30fc\u30d0\u30eb\u30bb\u30ab\u30f3\u30c0\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3082\u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u6b21\u56de<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=1769\" rel=\"noopener\" target=\"_blank\">\u3010DynamoDB\u3011AWS SDK \u3092\u4f7f\u7528\u3057\u305f\u9805\u76ee\u306e\u8ffd\u52a0<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306fDynamoDB\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":5,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,19,20],"tags":[],"class_list":["post-2211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-dynamodb","category-lambda"],"_links":{"self":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/2211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2211"}],"version-history":[{"count":9,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/2211\/revisions"}],"predecessor-version":[{"id":3181,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/2211\/revisions\/3181"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/media\/5"}],"wp:attachment":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}