{"id":14404,"date":"2015-10-19T10:33:07","date_gmt":"2015-10-19T01:33:07","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=14404"},"modified":"2019-05-13T17:51:11","modified_gmt":"2019-05-13T08:51:11","slug":"post14404","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2015\/10\/14404\/","title":{"rendered":"AWS \u306e\u304a\u5f97\u306a\u6a5f\u80fd\u3060\u3051\u3067\u30cd\u30a4\u30c6\u30a3\u30d6\u30b2\u30fc\u30e0\u30b5\u30fc\u30d0\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u6628\u4eca\u4f55\u304b\u3068\u8a71\u984c\u306b\u6319\u304c\u3063\u3066\u304d\u305f AWS Lambda \u3068 AWS DynamoDB \u3092\u6d3b\u7528\u3057\u3066\u683c\u5b89\u3067\u5805\u7262\u3001\u9ad8\u6027\u80fd\u306a\u30b2\u30fc\u30e0\u30b5\u30fc\u30d0\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p>\u65e2\u5b58\u30b7\u30b9\u30c6\u30e0\u306e\u82e6\u52b4\u3092\u3082\u3068\u306b\u3001\u30b5\u30fc\u30d0\u306e\u958b\u767a\u3084\u904b\u7528\u3092\u9811\u5f35\u3089\u305a\u306b\u3059\u3080\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3068\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u304b\u3089\u306e AWS Lambda \u306e\u5229\u7528\u65b9\u6cd5\u3092\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30fc\u30d0\u304c\u826f\u304f\u308f\u304b\u3089\u3093\u3068\u3044\u3046\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30b2\u30fc\u30e0\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u30a8\u30f3\u30b8\u30cb\u30a2\u306b\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u203b<em>\u5f53\u5185\u5bb9\u306f\u591a\u5206\u306b\u500b\u4eba\u4e3b\u89b3\u3092\u542b\u3093\u3067\u304a\u308a\u3001\u6642\u4e8b\u7684\u306a\u8981\u7d20\u3082\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/em><br \/>\n\u203b<em>\u691c\u7d22\u3057\u3066\u5341\u5206\u306a\u8cc7\u6599\u304c\u3042\u308b\u3068\u8003\u3048\u3089\u308c\u308b\u30c4\u30fc\u30eb\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5229\u7528\u65b9\u6cd5\u7b49\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u3002<\/em><\/p>\n<h2>\u304a\u3055\u3089\u3044<\/h2>\n<p>\u307e\u305a\u306f\u65e2\u5b58\u306e\u30b2\u30fc\u30e0\u30b5\u30fc\u30d0\u306e\u69cb\u6210\u3092\u521d\u6b69\u304b\u3089\u304a\u3055\u3089\u3044\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14405\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/1-600x273.png\" alt=\"1\" width=\"600\" height=\"273\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/1-600x273.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/1-276x126.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/1.png 714w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u7c21\u5358\u306b\u30b5\u30fc\u30d3\u30b9\u3059\u308b\u65b9\u6cd5\u3068\u3057\u3066\u30a2\u30d7\u30ea\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u308b HTTP \u306e\u30b5\u30fc\u30d0\u3068\u5229\u7528\u8005\u306e\u60c5\u5831\u3092\u683c\u7d0d\u3057\u3066\u304a\u304f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3059\u3050\u306b\u601d\u3044\u3064\u304f\u3060\u3051\u3067\u3082\u3044\u304f\u3064\u304b\u306e\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u901a\u4fe1\u304c\u6697\u53f7\u5316\u3055\u308c\u3066\u304a\u3089\u305a\u3001\u5229\u7528\u8005\u3092\u5371\u967a\u306b\u3055\u3089\u3057\u3066\u3057\u307e\u3046<\/li>\n<li>\u56db\u516d\u6642\u4e2d\u30c0\u30a6\u30f3\u3057\u3066\u3044\u306a\u3044\u304b\u6c17\u306b\u306a\u3063\u3066\u3057\u307e\u3046<\/li>\n<li>\u30b5\u30fc\u30d0\u66f4\u65b0\u306e\u3068\u304d\u3084\u3001\u30c7\u30fc\u30bf\u5909\u66f4\u306a\u3069\u3067\u983b\u7e41\u306b\u30e1\u30f3\u30c6\u5165\u308a\u3057\u3066\u3057\u307e\u3046<\/li>\n<li>\u8272\u3005\u8a70\u3081\u8fbc\u307e\u308c\u3001\u6697\u9ed9\u77e5\u307e\u307f\u308c\u306b\u306a\u3063\u3066\u3057\u307e\u3046<\/li>\n<\/ul>\n<p>\u3053\u306e\u7a0b\u5ea6\u3067\u3082\u30b5\u30fc\u30d0\u4e8c\u53f0\u306f\u5fc5\u8981\u3067\u3059\u3002\u5fa9\u65e7\u3082\u305f\u3044\u3078\u3093\u3067\u3059\u3002\u3068\u3066\u3082\u5b9f\u7528\u306b\u8010\u3048\u3089\u308c\u307e\u305b\u3093\u3002\u30af\u30e9\u30a6\u30c9\u306e<strong>\u4e00\u756a\u5b89\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u9078\u3093\u3067\u3082\u6bce\u6708\u5343\u5186\u524d\u5f8c<\/strong>\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u203b <em>2015\u5e7410\u6708\u3057\u3089\u3079\u3001\u6700\u5c0f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u6708\u984d\u3002<\/em><\/p>\n<ul>\n<li>Google Compute Engine, f1-micro, $4.04 (\uffe5480) <a href=\"https:\/\/cloud.google.com\/compute\/pricing\">https:\/\/cloud.google.com\/compute\/pricing<\/a><\/li>\n<li>IDCF Cloud , S1, \uffe5500 (\uffe5540) <a href=\"http:\/\/www.idcf.jp\/cloud\/price.html\">http:\/\/www.idcf.jp\/cloud\/price.html<\/a><\/li>\n<li>\u3055\u304f\u3089\u306eVPS, 512, \uffe5635 (\uffe5685) <a href=\"http:\/\/vps.sakura.ad.jp\/specification\/\">http:\/\/vps.sakura.ad.jp\/specification\/<\/a><\/li>\n<li>ConoHa by GMO, \uffe5900 (\uffe5972) <a href=\"https:\/\/www.conoha.jp\/pricing\">https:\/\/www.conoha.jp\/pricing<\/a><\/li>\n<li>AWS EC2, t2.micro, $14.4 (\uffe51713) <a href=\"https:\/\/aws.amazon.com\/jp\/ec2\/pricing\/\">https:\/\/aws.amazon.com\/jp\/ec2\/pricing\/<\/a><\/li>\n<\/ul>\n<hr \/>\n<p>\u305d\u3057\u3066\u52b9\u7387\u3088\u304f\u30b5\u30fc\u30d3\u30b9\u3059\u308b\u305f\u3081\u306b\u6700\u4f4e\u3067\u3082\u6b21\u306e\u3088\u3046\u306a\u69cb\u6210\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14406\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/2-600x365.png\" alt=\"2\" width=\"600\" height=\"365\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/2-600x365.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/2-276x168.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/2-830x504.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/2.png 1060w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<ul>\n<li>\u6b63\u3057\u3044\u30c9\u30e1\u30a4\u30f3\u3092\u53d6\u5f97\u3057\u3001 SSL \u901a\u4fe1\u3092\u5229\u7528\u3057\u3066\u5229\u7528\u8005\u3092\u5b88\u308b<\/li>\n<li>Load Balancer \u3092\u69cb\u7bc9\u3057\u3001\u30b5\u30fc\u30d0\u306e\u5197\u9577\u6027\u3092\u4fdd\u3061\u3001\u5b89\u5168\u306b\u30c7\u30d7\u30ed\u30a4\u3059\u308b<\/li>\n<li>\u5404\u30b7\u30b9\u30c6\u30e0\u306e\u7570\u5e38\u3092\u77e5\u3089\u305b\u308b\u305f\u3081\u306e\u76e3\u8996\u30b7\u30b9\u30c6\u30e0\u3092\u8a2d\u7f6e\u3057\u3001\u969c\u5bb3\u6642\u9593\u3092\u77ed\u7e2e\u3059\u308b<\/li>\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3084\u30ec\u30d7\u30ea\u30ab\u3092\u904b\u7528\u3057\u3001\u5b89\u5168\u306b\u30b9\u30b1\u30fc\u30eb\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u3059\u308b<\/li>\n<\/ul>\n<p>\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u3057\u3084\u3059\u304f\u30b5\u30fc\u30d3\u30b9\u306e\u4eba\u6c17\u306b\u5fdc\u3058\u3066\u54c1\u8cea\u3092\u9ad8\u3081\u3084\u3059\u304f\u3001\u3053\u3046\u3044\u3063\u305f\u69cb\u6210\u306f\u591a\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u8cbb\u7528\u3068\u3057\u3066\u306f\u3001\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u30fc\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u5358\u4e00\u969c\u5bb3\u70b9\u3068\u3057\u3001DNS \u306f\u4ed6\u793e\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3082\uff16\u53f0\u5206\u3068 SSL \u8a3c\u660e\u66f8\u3001\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u4ee3\u304c\u767a\u751f\u3057\u307e\u3059\u3002<strong>\u3082\u308d\u3082\u308d\u3067\u6bce\u6708\u4e00\u4e07\u5186\u3050\u3089\u3044<\/strong>\u304b\u304b\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u308f\u305a\u304b\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3082\u305d\u308c\u306a\u308a\u306b\u8cbb\u7528\u304c\u304b\u304b\u308a\u3001\u305d\u306e\u52b9\u7387\u304c\u3088\u304f\u306a\u308b\u306b\u306f\u6570\u5341\u53f0\uff5e\uff11\uff10\uff10\u53f0\u307b\u3069\u306e\u898f\u6a21\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u7406\u60f3\u3067\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3082\u3068\u3053\u308d\u3069\u3053\u308d\u5f37\u5316\u3057\u3001\u30a4\u30f3\u30d5\u30e9\u4ee3\u3060\u3051\u3067\u6570\u767e\u4e07\u5186\u898f\u6a21\u306b\u81a8\u3089\u307f\u3001\u76f8\u5bfe\u7684\u306b\u904b\u7528\u30b7\u30b9\u30c6\u30e0\u306e\u30b3\u30b9\u30c8\u3092\u6291\u3048\u308b\u3053\u3068\u3067\u3059\u3002<br \/>\n\u203b <em>\u305d\u3057\u3066\u3001\u3053\u306e\u3053\u308d\u306b\u306f\u30c7\u30d7\u30ed\u30a4\u306e\u9ad8\u901f\u5316\u3084\u30b5\u30fc\u30d3\u30b9\u5168\u4f53\u306e\u6700\u9069\u5316\u3001\u8ce2\u3044\u69cb\u6210\u7ba1\u7406\u3001\u904b\u7528\u81ea\u52d5\u5316\u3001\u5206\u5272\u306e\u6226\u7565\u3082\u8ab2\u984c\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u308d\u3067\u3059\u3002<\/em><\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14407\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/3-600x360.png\" alt=\"3\" width=\"600\" height=\"360\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/3-600x360.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/3-276x166.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/3-830x498.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/3.png 1048w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u3057\u304b\u3057\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u306f\u3082\u3061\u308d\u3093\u3001\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u3067\u3059\u3089\u30ea\u30c3\u30c1\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5316\u3057\u3066\u304d\u3066\u304a\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e\u5f79\u5272\u306f\u6e1b\u3063\u3066\u304d\u3066\u3044\u307e\u3059\u3002\u5f93\u6765\u306e\u3088\u3046\u306b\u30da\u30fc\u30b8\u6bce\u306b\u72b6\u614b\u3092\u3059\u3079\u3066\u96c6\u3081\u3001 HTML \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u3042\u3066\u306f\u3081\u3066\u51fa\u529b\u3059\u308b\u3053\u3068\u306f\u306a\u304f\u3001\u5fc5\u8981\u306a\u3068\u304d\u306b\u5fc5\u8981\u306a\u72b6\u614b\u3060\u3051\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u53d6\u5f97\u3057\u3001\u4fdd\u6301\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3066\u753b\u9762\u3092\u69cb\u6210\u3055\u305b\u3001\u30b2\u30fc\u30e0\u306e\u9032\u884c\u3092\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14412\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/6-600x319.png\" alt=\"6\" width=\"600\" height=\"319\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/6-600x319.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/6-276x147.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/6-830x441.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/6.png 1077w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u30c7\u30d7\u30ed\u30a4\u3084\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u7b49\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5f0f\u6574\u5099\u3057\u3066\u63c3\u3048\u3001\u305d\u306e\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3057\u305f\u3068\u3057\u3066\u3082\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u3067\u306f\u305f\u304b\u3060\u304b\u6570\u53f0\u3067\u8cc4\u3048\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u3001\u305d\u308c\u306b\u3057\u3066\u306f\u30b7\u30b9\u30c6\u30e0\u3092\u904b\u7528\u3059\u308b\u305f\u3081\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u5927\u304d\u3044\u306e\u306f\u660e\u3089\u304b\u3067\u3059\u3002<\/p>\n<hr \/>\n<h2>Lambda \u3068 DynamoDB \u3068\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u306b\u3064\u3044\u3066\u306e\u3082\u304f\u308d\u307f<\/h2>\n<p>\u304a\u3055\u3089\u3044\u304c\u3067\u304d\u305f\u3068\u3053\u308d\u3067\u73fe\u5b9f\u7684\u306a\u3068\u3053\u308d\u3092\u898b\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u5148\u307b\u3069\u307e\u3067\u306e\u30b5\u30fc\u30d0\u69cb\u6210\u306b\u3064\u3044\u3066\u306f\u3044\u308f\u3086\u308b IaaS \u30ec\u30d9\u30eb\u3092\u60f3\u5b9a\u3057\u3066\u304a\u308a\u3001\u904b\u7528\u8005\u306f\u30b5\u30fc\u30d0 OS \u306e\u7ba1\u7406\u8005\u3068\u306a\u308a\u3001\u81ea\u7531\u306b\u8a2d\u5b9a\u3084\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u5c0e\u5165\u7b49\u304c\u3067\u304d\u307e\u3059\u3002\u60c5\u5831\u3082\u591a\u304f\u3001\u5bfe\u5fdc\u3067\u304d\u308b\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2\u3082\u6bd4\u8f03\u7684\u591a\u304f\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/51.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/51-600x246.png\" alt=\"5\" width=\"600\" height=\"246\" class=\"alignnone size-medium wp-image-14437\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/51-600x246.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/51-276x113.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/51-830x341.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/51.png 1143w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u5bfe\u3057\u3066\u3001 PaaS \u3084 SaaS\u3001BaaS \u3067\u306f\u3088\u308a\u9ad8\u30ec\u30d9\u30eb\u306a\u958b\u767a\u3001\u904b\u7528\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u3048\u3066\u3057\u3066 *aaS \u306f\u30b5\u30fc\u30d0\u958b\u767a\u95a2\u9023\u306e\u8a71\u3067\u3001\u30b5\u30fc\u30d3\u30b9\u3082\u591a\u304f\u3001\u60c5\u5831\u304c\u6563\u9038\u3057\u3066\u3057\u307e\u3044\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u958b\u767a\u8005\u304b\u3089\u3057\u3066\u307f\u305f\u3089\u8208\u5473\u5916\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u308f\u308c\u307e\u3059\u3002\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u5411\u3051\u3067\u306f API \u3084 SDK \u7b49\u304c\u63c3\u3063\u3066\u3044\u3066\u30b5\u30fc\u30d0\u5074\u306e\u958b\u767a\u3092\u4e0d\u8981\u3068\u3059\u308b\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u4e00\u6c17\u306b\u81ea\u7531\u5ea6\u304c\u5931\u308f\u308c\u3066\u3057\u307e\u3044\u3001\u3061\u3087\u3046\u3069\u826f\u3055\u305d\u3046\u306a\u3082\u306e\u3092\u63a2\u3057\u3001\u7fd2\u5f97\u3059\u308b\u306e\u306b\u82e6\u52b4\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14410\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/4-600x245.png\" alt=\"4\" width=\"600\" height=\"245\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/4-600x245.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/4-276x113.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/4-830x339.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/4.png 1145w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u3057\u304b\u3057\u3001\u305d\u3046\u3044\u3063\u305f\u4e2d\u3067\u3082 Lambda \u306f\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u3068\u76f8\u6027\u304c\u826f\u3044\u3068\u8003\u3048\u3001\u305d\u306e\u7406\u7531\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u95a2\u6570\u5358\u4f4d\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u3001\u6700\u5c0f\u306e\u30b3\u30fc\u30c9\u306f\u3068\u3066\u3082\u5c0f\u3055\u304f\u3067\u6e08\u3080<\/li>\n<li>Web \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3063\u307d\u3055\u304c\u5168\u304f\u306a\u304f\u3001\u3044\u308f\u3086\u308b CGI \u3088\u308a\u3082\u52d5\u4f5c\u3092\u628a\u63e1\u3057\u3084\u3059\u3044<\/li>\n<li>\u30c7\u30d7\u30ed\u30a4\u306e\u5de5\u592b\u306a\u3069\u304c\u5fc5\u8981\u306a\u304f\u3001\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u7b49\u3082\u63c3\u3063\u3066\u3044\u308b\u3002\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u5bfe\u8c61\u3082\u5c11\u306a\u3044<\/li>\n<li>\u95a2\u6570\u306e\u5165\u51fa\u529b\u304c\u539f\u5247 JSON \u3067\u3042\u308b\u304c\u3001 HTML \u3092\u8003\u3048\u306a\u304f\u3066\u826f\u3044\u306e\u3067\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u3067\u3042\u308c\u3070\u3080\u3057\u308d\u597d\u90fd\u5408<\/li>\n<li>Lambda \u306b\u306f\u72b6\u614b\u3092\u4fdd\u6301\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305a\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u7b49\u306e\u4ed5\u7d44\u307f\u3082\u7121\u3044\u304c\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u5074\u3067\u5bfe\u5fdc\u3067\u304d\u308b<\/li>\n<li>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u306e\u3068\u5927\u5dee\u7121\u304f\u3001\u30d9\u30f3\u30c0\u30fc\u30ed\u30c3\u30af\u30a4\u30f3\u3057\u306a\u3044\u3002 Lambda \u3092\u5229\u7528\u3057\u306a\u304f\u3066\u3082\u5bb9\u6613\u306b\u5225\u306e\u74b0\u5883\u3067\u52d5\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u308b<\/li>\n<li>\u6700\u5c0f\u8a2d\u5b9a\u3067\u306f\u3072\u3068\u3064\u306e\u30af\u30a8\u30ea\u306b\u3066 128M \u307e\u3067\u306e\u30e1\u30e2\u30ea\u3057\u304b\u4f7f\u3048\u306a\u3044\u304c\u3001\u6628\u4eca\u306e HTTP \u3092\u51e6\u7406\u3059\u308b\u30b9\u30ec\u30c3\u30c9\u3068\u6bd4\u8f03\u3057\u3066\u3082\u5f15\u3051\u3092\u53d6\u3089\u306a\u3044<\/li>\n<li>HTTPd \u3067\u306f REMOTE_ADDRESS \u3068\u3055\u308c\u308b\u30a2\u30af\u30bb\u30b9\u5143\u306e\u30a2\u30c9\u30ec\u30b9\u304c\u53d6\u5f97\u3067\u304d\u308b\u304c\u3001\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306f\u30ad\u30e3\u30ea\u30a2 NAT \u306e\u30a2\u30c9\u30ec\u30b9\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u304f\u3001\u4e00\u610f\u306b\u8b58\u5225\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044<\/li>\n<\/ul>\n<p>\u305d\u3057\u3066 DynamoDB \u3068\u7d44\u307f\u5408\u308f\u305b\u305f\u5834\u5408\u306f\u3001<\/p>\n<ul>\n<li>\u304a\u304a\u3080\u306d Key Value Store \u3067\u30b9\u30ad\u30fc\u30de\u304c\u3086\u308b\u304f\u3001\u3044\u308f\u3086\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306b\u3088\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3068\u76f8\u6027\u304c\u826f\u3044<\/li>\n<li>\u30ea\u30af\u30a8\u30b9\u30c8\u3084\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u5fc3\u306a\u3057\u304b\u9045\u3044\u304c\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u3067\u306f\u975e\u540c\u671f\u304b\u3064\u30af\u30a8\u30ea\u306e\u7c92\u5ea6\u3092\u5909\u3048\u3084\u3059\u3044<\/li>\n<li>\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30e2\u30c7\u30eb\u306f\u6271\u3044\u306b\u304f\u3044\u304c\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u3067\u306f\u30bd\u30fc\u30b7\u30e3\u30eb\u8981\u7d20\u304c\u8584\u3044\u50be\u5411\u306b\u3042\u308b<\/li>\n<li>DynamoDB Stream \u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4ed6\u306e Lambda \u3092\u30d0\u30c3\u30c1\u51e6\u7406\u7684\u306b\u6271\u3048\u308b<\/li>\n<li>nodejs \u3084 python \u74b0\u5883\u304c\u3042\u308c\u3070 DynamoDB Local \u3092\u5229\u7528\u3057\u3066\u3059\u3079\u3066\u30aa\u30d5\u30e9\u30a4\u30f3\u74b0\u5883\u3067\u3082\u958b\u767a\u3067\u304d\u308b<\/li>\n<\/ul>\n<p>\u3068\u3001\u305d\u308c\u305e\u308c\u306e\u5229\u70b9\u3092\u6d3b\u304b\u3057\u3001\u6b20\u70b9\u3092\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u306e\u7279\u5fb4\u3067\u56de\u907f\u3067\u304d\u308b\u305f\u3081\u76f8\u6027\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002\u3082\u3061\u308d\u3093\u3001\u6697\u53f7\u5316\u901a\u4fe1\u306b\u5bfe\u5fdc\u6e08\u307f\u306e SDK \u3082\u3042\u308a\u3001\u30a2\u30d7\u30ea\u304b\u3089\u5b89\u5168\u306b\u76f4\u63a5 Lambda \u95a2\u6570\u3092\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14411\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/7-600x310.png\" alt=\"7\" width=\"600\" height=\"310\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/7-600x310.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/7-276x143.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/7-830x429.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/7.png 1050w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>\u5168\u4f53\u7684\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308a\u3064\u3064\u3082\u3001\u9ad8\u3044\u5b89\u5b9a\u6027\u3068\u62e1\u5f35\u6027\u3092\u7372\u5f97\u3067\u304d\u305d\u3046\u3067\u3059\u3002AWS \u3067\u3082 EC2 \u95a2\u9023\u306f\u6bd4\u8f03\u7684\u9ad8\u984d\u3067\u3059\u304c\u3001\u9a5a\u304f\u3053\u3068\u306b\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u306f\u975e\u5e38\u306b\u5b89\u304f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/aws.amazon.com\/jp\/lambda\/pricing\/\">https:\/\/aws.amazon.com\/jp\/lambda\/pricing\/<\/a> 100 \u4e07\u56de\u307e\u3067\u7121\u6599<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/jp\/dynamodb\/pricing\/\">https:\/\/aws.amazon.com\/jp\/dynamodb\/pricing\/<\/a> \u8aad\u307f\u66f8\u304d 25 \u30e6\u30cb\u30c3\u30c8\u307e\u3067\u7121\u6599<\/li>\n<\/ul>\n<hr\/>\n<h2>\u5229\u7528\u8a08\u753b<\/h2>\n<p>\u305d\u308c\u305e\u308c\u306e\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3044\u3064\u3064\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>SDK \u306e\u30d3\u30eb\u30c9\u3068\u7d44\u307f\u8fbc\u307f<\/li>\n<li>\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u304b\u3089 Lambda \u306e\u547c\u3073\u51fa\u3057\u78ba\u8a8d<\/li>\n<li>Lambda \u304b\u3089 DynamoDB \u306e\u8aad\u307f\u66f8\u304d\u78ba\u8a8d<\/li>\n<li>\u65e2\u5b58\u30b5\u30fc\u30d0\u304b\u3089\u306e\u79fb\u884c<\/li>\n<\/ul>\n<h3>SDK \u306e\u30d3\u30eb\u30c9\u3068\u7d44\u307f\u8fbc\u307f<\/h3>\n<p>SDK \u306f C++11 \u3067\u66f8\u304b\u308c\u3066\u304a\u308a\u3001 CMake \u306b\u3088\u3063\u3066\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002\u3059\u3067\u306b\u30a2\u30d7\u30ea\u3092 CMake \u3067\u30d3\u30eb\u30c9\u3057\u3066\u3044\u305f\u5834\u5408\u306f\u3068\u3066\u3082\u7c21\u5358\u306b\u7d44\u307f\u8fbc\u3081\u307e\u3059\u304c\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f\u5358\u72ec\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30d3\u30eb\u30c9\u3057\u3001\u30d0\u30a4\u30ca\u30ea\u3092\u30ea\u30f3\u30af\u3059\u308b\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>SDK \u306b\u306f AWS \u306e\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u306e API \u3082\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u8003\u3048\u306a\u3057\u306b\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3048\u3089\u3044\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<br \/>\n\u203b <a href=\"https:\/\/github.com\/awslabs\/aws-sdk-cpp\">https:\/\/github.com\/awslabs\/aws-sdk-cpp<\/a> \u306e\u5404\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/p>\n<p>\u30d3\u30eb\u30c9\u306f CMake \u306a\u306e\u3067\u5bb9\u6613\u3067\u3059\u3057\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3082\u3067\u304d\u308b\u306e\u3067 Android \u3082 Linux \u3068\u3057\u3066\u30d3\u30eb\u30c9\u3059\u308b\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\uff08\u7406\u7531\u306f\u5f8c\u8ff0\uff09\u3002<br \/>\ntoolchain \u30d5\u30a1\u30a4\u30eb\u306f aws-sdk-cpp \u5185\u306b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u672c\u4f53\u3068\u5408\u308f\u305b\u308b\u305f\u3081\u5225\u9014\u3001<br \/>\n<a href=\"https:\/\/github.com\/taka-no-me\/android-cmake.git\">https:\/\/github.com\/taka-no-me\/android-cmake.git<\/a> \u3053\u3061\u3089\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>Windows \u4ee5\u5916\u306e OS \u3067\u306f cURL \u3068 OpenSSL, zlib \u306b\u5916\u90e8\u4f9d\u5b58\u3057\u3066\u307e\u3059\u3002<br \/>\ncURL \u3068 OpenSSL \u306e\u30d3\u30eb\u30c9\u306f\u5927\u5909\u9762\u5012\u3067\u3059\u304c\u3001 <a href=\"https:\/\/github.com\/gcesarmza\/curl-android-ios\">https:\/\/github.com\/gcesarmza\/curl-android-ios<\/a> \u3092\u5229\u7528\u3059\u308b\u306e\u304c\u6bd4\u8f03\u7684\u7c21\u5358\u3067\u3059\u3002<br \/>\nif(PLATFORM_ANDROID) \u306e\u5834\u5408\u3001\u5916\u90e8\u4f9d\u5b58\u30ea\u30dd\u30b8\u30c8\u30ea\u3092 git clone \u3057\u3066\u304d\u3066\u30d3\u30eb\u30c9\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u3057\u307e\u3059\u3002<br \/>\naws-sdk-cpp \u3068\u30a2\u30d7\u30ea\u672c\u4f53\u3067\u5225\u3005\u30d0\u30fc\u30b8\u30e7\u30f3\u306e cURL \u3068 OpenSSL \u3092\u30ea\u30f3\u30af\u3059\u308b\u3068\u3048\u3089\u3044\u5bb9\u91cf\u306b\u306a\u308b\u306e\u3067\u30a2\u30d7\u30ea\u672c\u4f53\u306e cURL \u3068 OpenSSL \u306f\u5171\u6709\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>\u96c6\u3081\u308b\u3082\u306e<\/p>\n<ul>\n<li>git clone https:\/\/github.com\/awslabs\/aws-sdk-cpp.git<\/li>\n<li>git clone https:\/\/github.com\/gcesarmza\/curl-android-ios.git<\/li>\n<li>wget http:\/\/zlib.net\/zlib-1.2.8.tar.gz<\/li>\n<li>git clone https:\/\/github.com\/taka-no-me\/android-cmake.git # Android \u30d3\u30eb\u30c9\u7528<\/li>\n<\/ul>\n<p>CMakeLists.txt \u3092\u7de8\u96c6\u3057\u3001\u5fc5\u8981\u306a\u90e8\u5206\u3060\u3051\u53d6\u308a\u8fbc\u3080<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/awslabs\/aws-sdk-cpp\/blob\/master\/CMakeLists.txt#L375\">https:\/\/github.com\/awslabs\/aws-sdk-cpp\/blob\/master\/CMakeLists.txt#L375<\/a><\/li>\n<li>add_subdirectory \u306b\u304a\u3051\u308b\u3001 aws-cpp-sdk-core \u3068 aws-cpp-sdk-lambda \u4ee5\u5916\u3092\u3059\u3079\u3066\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8<\/li>\n<li>CMake \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u6e21\u3059\u306e\u304c\u610f\u5916\u3068\u624b\u9593\u306b\u306a\u308b\u306e\u3067\u8a2d\u5b9a\u3092\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3057\u3066\u3057\u307e\u3063\u3066\u3082\u826f\u3055\u305d\u3046<\/li>\n<\/ul>\n<p>\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u306e\u5834\u5408\u308f\u305a\u304b\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u5bb9\u91cf\u3092\u6291\u3048\u308b\u305f\u3081\u306b aws-sdk-cpp \u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u306e\u3082\u304a\u3059\u3059\u3081\u3067\u3059\u3002<br \/>\n\u203b <a href=\"https:\/\/github.com\/awslabs\/aws-sdk-cpp\/tree\/master\/aws-cpp-sdk-core\/include\/aws\/core\/utils\">https:\/\/github.com\/awslabs\/aws-sdk-cpp\/tree\/master\/aws-cpp-sdk-core\/include\/aws\/core\/utils<\/a><\/p>\n<p>\u3059\u3067\u306b CMake \u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u3001CMakeLists.txt \u306b add_subdirectory(aws-sdk-cpp) \u3084 include_directories() \u3092\u52a0\u3048\u3001\u30a2\u30d7\u30ea\u3068\u4e00\u7dd2\u306b\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<br \/>\n\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5358\u72ec\u3067\u30d3\u30eb\u30c9\u3059\u308b\u5834\u5408\u3001 README.md \u306e\u901a\u308a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u3066\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>-G \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3088\u308b\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u306e\u9078\u629e( XCode,VisualStudio,Makefile)<\/li>\n<li>Android \u306e\u5834\u5408\u3001 -DCMAKE_TOOLCHAIN_FILE \u3068 -DANDROID_ABI(armv7,8,x86) -DANDROID_TOOLCHAIN_NAME(gcc4.8,4.9,clang) \u306a\u3069\u306e\u6307\u5b9a<\/li>\n<li>-DCMAKE_BUILD_TYPE=Release<\/li>\n<li>-DTARGET_ARCH=Linux<\/li>\n<li>\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001 STATIC_LINKING=1 \u306a\u3069<\/li>\n<\/ul>\n<p>\u30a2\u30d7\u30ea\u306e\u307b\u3046\u3082\u30d3\u30eb\u30c9\u306e\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002\u3060\u3044\u305f\u3044\u6b21\u306e\u30d8\u30c3\u30c0\u306b\u30d1\u30b9\u304c\u901a\u3063\u3066\u308c\u3070\u5341\u5206\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"lang:c++ decode:true \" >#include &lt;aws\/lambda\/LambdaClient.h&gt;\n#include &lt;aws\/core\/client\/ClientConfiguration.h&gt;\n#include &lt;aws\/core\/auth\/AWSCredentialsProvider.h&gt;\n#include &lt;aws\/core\/Region.h&gt;\n#include &lt;aws\/lambda\/model\/InvokeRequest.h&gt;\n#include &lt;aws\/lambda\/model\/InvocationType.h&gt;\n#include &lt;aws\/lambda\/model\/InvokeResult.h&gt;\n#include &lt;aws\/lambda\/LambdaErrors.h&gt;\n#include &lt;aws\/lambda\/LambdaErrorMarshaller.h&gt;\n#include &lt;aws\/core\/utils\/Outcome.h&gt;\n#include &lt;aws\/core\/utils\/logging\/AWSLogging.h&gt;\n#include &lt;aws\/core\/utils\/logging\/ConsoleLogSystem.h&gt;\n#include &lt;aws\/core\/utils\/base64\/Base64.h&gt;\n#include &lt;aws\/core\/utils\/Array.h&gt;<\/pre>\n<p>\u30d3\u30eb\u30c9\u304c\u4e0a\u624b\u304f\u884c\u304b\u306a\u3044\u5834\u5408\u3001 make VERBOSE=1 \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u30d3\u30eb\u30c9\u30b3\u30de\u30f3\u30c9\u304c\u305d\u306e\u307e\u307e\u8868\u793a\u3055\u308c\u307e\u3059\u3002 CMakeLists.txt \u5185\u306b message \u95a2\u6570\u3092\u5229\u7528\u3057\u3066\u3001\u3044\u308f\u3086\u308b print \u30c7\u30d0\u30c3\u30b0\u3067\u4e0d\u9069\u5207\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8abf\u3079\u308b\u306e\u3082\u304a\u624b\u8efd\u3067\u3059\u3002<\/p>\n<p>CMakeLists.txt \u3092\u7de8\u96c6\u3092\u7dad\u6301\u3057\u3064\u3064 SDK \u3092\u66f4\u65b0\u3059\u308b\u3068\u304d\u306f\u6b21\u306e\u3088\u3046\u306b rebase \u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >git fetch\ngit commit -am \"my edit\"\ngit rebase origin\/master\n<\/pre>\n<h3>Lambda \u306e\u6e96\u5099\u3068\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u304b\u3089\u547c\u3073\u51fa\u3057\u78ba\u8a8d<\/h3>\n<p>Lambda function \u3092\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5411\u3051\u306e\u30e6\u30fc\u30b6\u3092\u4f5c\u308a\u3001<br \/>\n\u547c\u3073\u51fa\u3055\u308c\u308b\u305f\u3081\u306e Lambda functoin \u3092\u6e96\u5099\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14413\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/8-600x348.png\" alt=\"8\" width=\"600\" height=\"348\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/8-600x348.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/8-276x160.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/8-830x481.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/8.png 901w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<ul>\n<li>AWS \u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059<\/li>\n<li>\u30d8\u30c3\u30c0\u306e\u30bf\u30d6\u3092 Edit \u3057\u3001 IAM \u3068 Lambda \u3068 DynamoDB \u3092\u52a0\u3048\u3066\u304a\u304d\u307e\u3059<\/li>\n<li>IAM \u3092\u958b\u304d\u3001 Users \u2192 Create New Users \u3092\u9078\u629e\u3057\u307e\u3059<\/li>\n<li>Credential \u60c5\u5831\u3092\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059<\/li>\n<li>Policy \u2192 Create Policy \u3092\u9078\u629e\u3057\u307e\u3059<\/li>\n<li>Policy Generator \u3092\u9078\u3073\u3001<\/li>\n<li>AWS Service \u306b AWS Lambda<\/li>\n<li>Actions \u3088\u308a Invoke Function<\/li>\n<li>AWS \u306f * \u306e\u4e00\u6587\u5b57\u3092\u3044\u308c Add Statement \u3092\u62bc\u3057\u307e\u3059<\/li>\n<li>Next Step \u2192 Policy Name \u3092\u5206\u304b\u308a\u3084\u3059\u304f invoke-Lambda \u306a\u3069\u3068\u3057\u3066\u3001 Create Policy \u3057\u307e\u3059\u3002<\/li>\n<li>\u5148\u307b\u3069\u4f5c\u3063\u305f User \u3092\u9078\u629e\u3057\u3001 Attach Policy \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059<\/li>\n<li>\u305d\u3057\u3066\u4f5c\u6210\u3057\u305f\u30dd\u30ea\u30b7\u30fc\u540d\u3001 invoke-Lambda \u306a\u3069\u3092\u9078\u629e\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u3053\u307e\u3067\u306e\u624b\u9806\u3067\u3001\u3053\u306e\u30e6\u30fc\u30b6\u306e Security Credentials \u3092\u77e5\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e2d\u306e\u3069\u3053\u304b\u3089\u3067\u3082 Lambda \u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002\u305d\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u3053\u306e\u9375\u3092\u57cb\u3081\u8fbc\u3093\u3067\u3057\u307e\u3046\u305f\u3081\u3001\u6d41\u51fa\u3057\u3066\u3082\u826f\u3044\u3088\u3046\u306b\u4f59\u8a08\u306a\u30dd\u30ea\u30b7\u30fc\u3092\u4ed8\u4e0e\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>Create a Lambda function \u3092\u62bc\u3057\u3001 simple-mobile-backend \u3092\u9078\u3073\u307e\u3059<\/li>\n<li>Ranking \u306a\u3069\u3068 function \u540d\u3092\u8a2d\u5b9a\u3057\u3001 Role \u304b\u3089 * Basic with DynamoDB \u3092\u9078\u3073\u307e\u3059<\/li>\n<li>\u4e00\u6642\u7684\u306b IAM Role \u3092\u4f5c\u308b\u753b\u9762\u306b\u306a\u308b\u306e\u3067\u305d\u306e\u5834\u3067\u4f5c\u3063\u3066\u3057\u307e\u3044\u307e\u3059<\/li>\n<li>\u4ed6\u306f\u7279\u306b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306a\u304f\u3001 function \u4f5c\u6210\u307e\u3067\u884c\u3044\u307e\u3059\u3002<\/li>\n<li>function \u304c\u51fa\u6765\u305f\u3089\u5ff5\u306e\u305f\u3081\u3001 switch \u6587\u5185\u306e dynamo.* \u64cd\u4f5c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/li>\n<li>Save and Test \u3092\u884c\u3044\u3001 Template \u306f Mobile Backend \u3067\u8a66\u3057\u307e\u3059\u3002<\/li>\n<li>\u5b9f\u884c\u7d50\u679c\u306f Cloudwatch \u306b\u4fdd\u5b58\u3055\u308c\u308b\u305f\u3081\u3001\u30da\u30fc\u30b8\u4e0b\u90e8\u306e\u30ea\u30f3\u30af\u304b\u3089 Cloudwatch \u3092\u78ba\u8a8d\u3057\u306b\u3044\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u3053\u307e\u3067\u3067 AWS \u5074\u306e\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3067\u3059\u3002 AWS \u95a2\u9023\u306e\u8cc7\u6599\u306f\u5e78\u3044\u306b\u3082\u5927\u91cf\u306b\u3042\u308b\u305f\u3081\u3001\u691c\u7d22\u3059\u308c\u3070\u753b\u50cf\u3064\u304d\u3067\u306e\u89e3\u8aac\u3082\u3067\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>\u3064\u304e\u306b\u30a2\u30d7\u30ea\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:c++ decode:true \" >\/\/ Trace \u30ec\u30d9\u30eb\u3067\u30ed\u30b0\u306f\u305f\u304f\u3055\u3093\u51fa\u529b\nconst std::shared_ptr&lt;Aws::Utils::Logging::LogSystemInterface&gt; logr(new Aws::Utils::Logging::ConsoleLogSystem(Aws::Utils::Logging::LogLevel::Trace));\nAws::Utils::Logging::InitializeAWSLogging(logr);\n\n\/\/ \u4f5c\u6210\u3057\u305f IAM User \u306e\u9375\u3092\u8a18\u8ff0\nAws::Auth::AWSCredentials cred(\"****************CYDQ\", \"****************************43WX\");\nAws::Client::ClientConfiguration config;\nconfig.region = Aws::Region::AP_NORTHEAST_1;\n\/\/config.verifySSL = false; \/\/ OS \u306b\u305d\u306a\u308f\u308b\u8a3c\u660e\u66f8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u306a\u3044\u5834\u5408\u306f\u3072\u3068\u307e\u305a\u7121\u8996\n\nAws::Lambda::LambdaClient lambda(cred,config);\nAws::Lambda::Model::InvokeRequest invoke;\ninvoke.SetFunctionName(\"Ranking\");\ninvoke.SetInvocationType(Aws::Lambda::Model::InvocationType::Event);\ninvoke.SetBody(\"{\\\"operation\\\": \\\"echo\\\", \\\"message\\\": \\\"Hello Lambda!\\\"}\");\nlambda.Invoke(invoke);\n<\/pre>\n<p>\u50c5\u304b\u3053\u308c\u3060\u3051\u3067\u3059\u3001\u4ed6\u306e AWS SDK \u3068\u6bd4\u8f03\u3057\u3066\u3082\u8a18\u8ff0\u91cf\u3084\u6a5f\u80fd\u306b\u5927\u5dee\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u307e\u305a\u306f PC \u3067\u30d3\u30eb\u30c9\u3057\u3066 PC \u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u305f\u65b9\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u547c\u3073\u51fa\u3055\u308c\u305f\u304b\u3069\u3046\u304b\u306e\u78ba\u8a8d\u306f Cloudwatch \u306e\u6642\u523b\u3067\u5206\u304b\u308a\u307e\u3059\u3002\u307e\u305f\u547c\u3073\u51fa\u3057\u56de\u6570\u306f Metrics \u306b\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3092\u53c2\u7167\u3059\u308b\u306e\u3082\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5931\u6557\u3057\u3084\u3059\u3044\u30dd\u30a4\u30f3\u30c8\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u7d44\u307f\u8fbc\u307f\u5468\u308a\u3067\u3001<\/p>\n<ul>\n<li>\u30ea\u30dd\u30b8\u30c8\u30ea\u306f aws-sdk-cpp \u3060\u304c\u30e9\u30a4\u30d6\u30e9\u30ea\u540d\u306f aws-cpp-sdk \u3084 aws-cpp-sdk-lambda \u3068\u306a\u308b<\/li>\n<li>cURL \u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a3c\u660e\u66f8\u30d1\u30b9\u304c\u5408\u308f\u306a\u304f\u3001 aws-sdk \u306b\u306f\u8a2d\u5b9a\u7b87\u6240\u304c\u7121\u3044\u3002 curl \u30d3\u30eb\u30c9\u6642\u306b\u3082\u8a2d\u5b9a\u3067\u304d\u308b<\/li>\n<li>\u30b9\u30ec\u30c3\u30c9\u30bb\u30fc\u30d5\u3067\u306f\u306a\u3044\uff08\u3068\u601d\u3046\uff09<\/li>\n<\/ul>\n<h3>Lambda \u304b\u3089 DynamoDB \u306e\u8aad\u307f\u66f8\u304d\u78ba\u8a8d<\/h3>\n<p>\u203b <em>10\u6708\u73fe\u5728\u3001 DynamoDB \u306f\u65b0\u3057\u3044 GUI \u3068\u5f93\u6765\u306e GUI \u306e\u4e21\u65b9\u304c\u6271\u3048\u307e\u3059\u304c\u5f93\u6765\u306e GUI \u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/em><\/p>\n<ul>\n<li>\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u3088\u308a DynamoDB \u3092\u9078\u3076<\/li>\n<li>Table Name \u306f Ranking<\/li>\n<li>Hash Attribute Name \u306b\u306f player<\/li>\n<li>Range Attribute Name \u306b\u306f score<\/li>\n<li>\u3042\u3068\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u307e\u307e Continue \u3057\u3066\u3044\u304d\u3001 Use Basic Alarms \u306e\u30c1\u30a7\u30c3\u30af\u306f\u306f\u305a\u3057\u3001 Create<\/li>\n<\/ul>\n<p>JavaScript \u306e\u30b3\u30fc\u30c9\u304b\u3089<\/p>\n<pre class=\"lang:js decode:true \" >var params = {};\nparams.TableName = \"Ranking\";\nparams.Item = {\n  player: {S:event.player},\n  score: {N:''+event.score}\n};\ndynamo.putItem(params, function(err,data){});\n<\/pre>\n<p>\u3068\u3057\u3066\u3001 event \u306b\u30d7\u30ec\u30a4\u30e4\u30fc\u540d\u3068\u30b9\u30b3\u30a2\u6570\u5024\u3092\u6e21\u305b\u3070 Dynamo \u306b\u30ec\u30b3\u30fc\u30c9\u304c\u5897\u3048\u308b\u306e\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p>\u3088\u308a\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306f SDK \u306b\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u304c\u3001 SQL \u3088\u308a\u306f\u4ed5\u69d8\u304c\u8584\u304f\u3001\u30b7\u30f3\u30d7\u30eb\u306b\u6271\u3048\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/docs.aws.amazon.com\/AWSJavaScriptSDK\/latest\/AWS\/DynamoDB.html\">http:\/\/docs.aws.amazon.com\/AWSJavaScriptSDK\/latest\/AWS\/DynamoDB.html<\/a><\/li>\n<li>\u4e0b\u4f4d\u4e92\u63db\u306e\u305f\u3081\u3067\u3042\u3063\u305f\u308a\u3001\u5ec3\u6b62\u4e88\u5b9a\u306e\u6a5f\u80fd\u304c\u6b8b\u3063\u3066\u3044\u308b\u306e\u3067\u6ce8\u610f\u6df1\u304f\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/li>\n<\/ul>\n<h3>\u65e2\u5b58\u30b5\u30fc\u30d0\u304b\u3089\u306e\u79fb\u884c\u3084\u4e92\u63db\u6027<\/h3>\n<p>\u305f\u3068\u3048\u3070\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u7cfb HTTPd \u306e\u30b5\u30fc\u30d3\u30b9\u3067\u306f URL \u306e\u30d1\u30fc\u30b9\u3084 application\/x-www-form-urlencoded \u7b49\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6e21\u3057\u3066\u3044\u308b\u304b\u3068\u601d\u308f\u308c\u307e\u3059\u3002\u3059\u3067\u306b application\/json \u3060\u3063\u305f\u5834\u5408\u306f\u3057\u3081\u305f\u3082\u306e\u3067\u3059\u3002 Body \u306e JSON \u304c\u305d\u306e\u307e\u307e Lambda \u306e handler \u306e\u7b2c\u4e00\u5f15\u6570\u306b\u6e21\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" >exports.handler = function (event, context) {\n  console.log('Received event:', JSON.stringify(event, null, 2));\n<\/pre>\n<p>\u3042\u3068\u306f\u901a\u5e38\u306e Web \u30b5\u30fc\u30d0\u3068\u540c\u3058\u304f\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u578b\u3084\u5024\u306e\u691c\u8a3c\u3092\u7d4c\u3066\u3001\u51e6\u7406\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u5148\u306b\u4f5c\u3063\u305f DynamoDB \u306e\u30c6\u30fc\u30d6\u30eb\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30e9\u30f3\u30ad\u30f3\u30b0\u98a8\u306b\u6271\u3046\u3068\u3059\u308b\u3068\u3001\u6574\u5408\u6027\u306f\u8ae6\u3081\u3066\u3001\u6b21\u306e\u3088\u3046\u306b\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<\/p>\n<pre class=\"lang:js decode:true \" >  dynamo.query({ \/\/ \u81ea\u8eab\u306e\u30cf\u30a4\u30b9\u30b3\u30a2\u304c\u7121\u3044\u304b\u30c1\u30a7\u30c3\u30af\n    TableName: \"Ranking\",\n    KeyConditions: {\n      player: {\n        ComparisonOperator: 'EQ',\n        AttributeValueList: [{ S: event.player }]\n      },\n      score: {\n        ComparisonOperator: 'GE',\n        AttributeValueList: [{ N: '' + event.score }]\n      }\n    },\n    Limit: 1,\n  }, function (err, data) {\n    if (!err &amp;&amp; data.Count == 0) {\n\n      dynamo.putItem({ \/\/ \u30cf\u30a4\u30b9\u30b3\u30a2\u3092\u8ffd\u52a0\n        TableName: \"Ranking\", \n        Item: {\n          player: { S: event.player },\n          score: { N: '' + event.score }\n        }\n      }, function (err, data) { });\n\n      dynamo.query({ \/\/ \u53e4\u3044\u30b9\u30b3\u30a2\u3092\u691c\u7d22\n        TableName: \"Ranking\",\n        KeyConditions: {\n          player: {\n            ComparisonOperator: 'EQ',\n            AttributeValueList: [{ S: event.player }]\n          },\n          score: {\n            ComparisonOperator: 'LT',\n            AttributeValueList: [{ N: '' + event.score }]\n          }\n        },\n      }, function (err, data) {\n        if (!err) {\n          for (var n = 0; n &lt; data.Items.length; n++) {\n            dynamo.deleteItem({ \/\/ \u53e4\u3044\u30b9\u30b3\u30a2\u3092\u524a\u9664\n              TableName: \"Ranking\",\n              Key: {\n                player: data.Items[n].player,\n                score: data.Items[n].score\n              },\n            }, function (err, data) { });\n          }\n        }\n      });\n    }\n  });\n<\/pre>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d1-314x400.png\" alt=\"d1\" width=\"314\" height=\"400\" class=\"alignnone size-medium wp-image-14439\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d1-314x400.png 314w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d1-157x200.png 157w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d1.png 656w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><\/a><\/p>\n<p>\u30a2\u30d7\u30ea\u306e\u52d5\u4f5c\u3068\u4e26\u5217\u3057\u3066\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u3092\u884c\u3046\u3060\u3051\u3067\u3042\u308c\u3070\u3068\u3066\u3082\u7c21\u5358\u3067\u3059\u3002\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u30b9\u30b3\u30a2\u767b\u9332\u3084\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306b\u306f\u3053\u306e\u624b\u6cd5\u3067\u3060\u3044\u305f\u3044\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5f53\u30b5\u30f3\u30d7\u30eb\u306e score \u306b range key \u3092\u8a2d\u5b9a\u3057\u306a\u3051\u308c\u3070 dynamo.updateItem \u306b\u3088\u308b\u90e8\u5206\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u5bfe\u8c61\u306b\u3082\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001 DynamoDB \u3092\u4fbf\u5229\u306b\u6271\u3046 npm \u3082\u7d50\u69cb\u3042\u308b\u306e\u3067\u3001\u6163\u308c\u3066\u304d\u305f\u3089\u5229\u7528\u3057\u3066\u3044\u304f\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002\u307e\u305a\u306f\u3001\u9762\u5012\u3067\u3059\u304c DynamoDB \u306e API \u3092\u305d\u306e\u307e\u307e\u4f7f\u3046\u307b\u3046\u304c\u7406\u89e3\u5ea6\u3092\u9ad8\u3081\u3084\u3059\u3044\u5370\u8c61\u3067\u3057\u305f\u3002<\/p>\n<h3>\u30a2\u30a4\u30c6\u30e0\u306e\u4e00\u90e8\u3060\u3051\u66f4\u65b0<\/h3>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d21.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d21-378x400.png\" alt=\"d2\" width=\"378\" height=\"400\" class=\"alignnone size-medium wp-image-14442\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d21-378x400.png 378w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d21-189x200.png 189w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d21.png 665w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\" \/><\/a><\/p>\n<p>\u30a2\u30a4\u30c6\u30e0\u306e\u4e00\u90e8\u3060\u3051\u66f4\u65b0\u3059\u308b\u3068\u304d\u306f getItem \u2192 \u4fee\u6b63 \u2192 updateItem \u306e\u6d41\u308c\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u4e26\u5217\u306b\u66f4\u65b0\u304c\u884c\u308f\u308c\u308b\u3068\u4e21\u65b9\u306e\u66f8\u304d\u8fbc\u307f\u306e\u3046\u3061\u3001\u7247\u65b9\u306e\u66f4\u65b0\u304c\u5931\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002 getItem \u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b <code>ConsistentRead: true<\/code> \u3092\u8a2d\u5b9a\u3057\u3001 updateItem \u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306e AttributeUpdates \u306b\u66f4\u65b0\u5f8c\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3001 Expected \u306b\u53d6\u5f97\u3057\u305f\u30a2\u30a4\u30c6\u30e0\u305d\u306e\u307e\u307e\u306e\u72b6\u614b\u3092\u6e21\u3057\u307e\u3059\u3002\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u66f4\u65b0\u3057\u3088\u3046\u3068\u3057\u305f\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5909\u66f4\u304c\u3042\u308c\u3070\u66f4\u65b0\u306b\u5931\u6557\u3057\u3001\u305d\u308c\u3092\u691c\u51fa\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3044\u308f\u3086\u308b\u697d\u89b3\u30ed\u30c3\u30af\u306f\u304a\u624b\u8efd\u306b\u3067\u304d\u307e\u3059\u3002 Lambda \u306f\u305d\u306e\u540d\u306e\u901a\u308a\u3001\u4ed6\u306e\u8a00\u8a9e\u306e\u30e9\u30e0\u30c0\u95a2\u6570\u3068\u540c\u3058\u304f\u4e0e\u3048\u3089\u308c\u305f DynamoDB \u306e\u72b6\u614b\u4ee5\u5916\u306b\u526f\u4f5c\u7528\u3092\u53ca\u307c\u3059\u6642\u306f\u3053\u306e\u624b\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002<\/p>\n<h3>\u4e8c\u91cd\u51e6\u7406\u9632\u6b62<\/h3>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d31.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d31-327x400.png\" alt=\"d3\" width=\"327\" height=\"400\" class=\"alignnone size-medium wp-image-14443\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d31-327x400.png 327w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d31-163x200.png 163w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d31.png 690w\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" \/><\/a><\/p>\n<p>updateItem \u3059\u308b\u3068\u304d\u306b\u6761\u4ef6\u3092\u4ed8\u3051\u308b\u65b9\u6cd5\u306f\u5148\u3068\u540c\u3058\u3067\u3001 Boolean \u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u521d\u671f\u5024\u304c false \u3068\u3057\u3001\u3082\u3068\u304c false \u3067\u3042\u308b\u3053\u3068\u3092\u671f\u5f85\u3057\u3064\u3064 true \u306e\u5024\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u3053\u3046\u3059\u308b\u3053\u3068\u3067\u51e6\u7406\u304c\u4e26\u5217\u306b\u52d5\u3044\u3066\u3057\u307e\u3063\u3066\u3082\u3001\u5148\u306b\u66f8\u304d\u8fbc\u3081\u305f\u65b9\u304c\u6210\u529f\u306b\u306a\u308a\u3001\u7247\u65b9\u306f\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u3001\u4e8c\u91cd\u51e6\u7406\u3092\u9632\u3052\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u60b2\u89b3\u30ed\u30c3\u30af\u3082\u3067\u304d\u307e\u3059\u3002\u3082\u3061\u308d\u3093\u3001\u30ed\u30c3\u30af\u89e3\u653e\u6f0f\u308c\u306b\u6c17\u3092\u4ed8\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30c8\u30ec\u30fc\u30c9\u306a\u3069<\/h3>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d4-324x400.png\" alt=\"d4\" width=\"324\" height=\"400\" class=\"alignnone size-medium wp-image-14444\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d4-324x400.png 324w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d4-162x200.png 162w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/d4.png 714w\" sizes=\"auto, (max-width: 324px) 100vw, 324px\" \/><\/a><\/p>\n<p>\u60b2\u89b3\u30ed\u30c3\u30af\u3092\u8907\u6570\u306e\u30ec\u30b3\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u884c\u3046\u4e8b\u3067\u3001\u7247\u65b9\u306e\u5024\u3092\u6e1b\u3089\u3057\u3001\u6e1b\u3089\u3057\u305f\u5206\u3060\u3051\u3082\u3046\u7247\u65b9\u306e\u5024\u3092\u5897\u3084\u3059\u306a\u3069\u3001\u4ed6\u306e\u30d7\u30ec\u30a4\u30e4\u30fc\u3068\u306e\u30c8\u30ec\u30fc\u30c9\u3082\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057 DynamoDB \u306f\u30b7\u30e3\u30fc\u30c7\u30a3\u30f3\u30b0\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u4e00\u610f\u306b\u51e6\u7406\u9806\u3092\u6c7a\u5b9a\u3055\u305b\u308b\u3053\u3068\u304c\u304a\u305d\u3089\u304f\u3067\u304d\u306a\u304f\u3001\u4e8c\u5c64\u30ed\u30c3\u30af\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u56de\u907f\u3059\u308b\u306e\u306f\u96e3\u3057\u3044\u3068\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u9014\u4e2d\u3067\u51e6\u7406\u304c\u6b62\u307e\u3063\u3066\u3057\u307e\u3046\u4e8b\u3082\u3042\u308a\u3001\u51e6\u7406\u6642\u9593\u3068\u6bd4\u4f8b\u3057\u3066\u5229\u7528\u6599\u304c\u8ab2\u91d1\u3055\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u51e6\u7406\u306f\u53b3\u3057\u3081\u306b\u8a2d\u5b9a\u3057\u305f\u307b\u3046\u304c\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>\u3088\u308a\u6d3b\u7528\u3057\u3066\u3044\u304f\u306b\u306f<\/h2>\n<ul>\n<li>SDK \u306f\u30b9\u30ec\u30c3\u30c9\u30bb\u30fc\u30d5\u3067\u306a\u3055\u305d\u3046\u306a\u306e\u3067 SDK \u5c02\u7528\u30b9\u30ec\u30c3\u30c9\u3068\u30e1\u30a4\u30f3\u30b9\u30ec\u30c3\u30c9\u3092\u30ad\u30e5\u30fc\u3067\u7e4b\u304e\u3001\u975e\u540c\u671f\u5316<\/li>\n<li>cURL \u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u6ce8\u610f\u3059\u308b<\/li>\n<li>CloudFormation \u3067 IAM \u306e\u7d30\u304b\u3044\u7ba1\u7406<\/li>\n<li>AWS CLI \u3067\u306e\u30c7\u30d7\u30ed\u30a4<\/li>\n<li>\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3084\u7279\u6b8a\u306a\u51e6\u7406\u3092 VPC \u5185\u306e EC2 \u3078\u79fb\u884c\u3001 Web \u7cfb\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u306e\u5171\u5b58<\/li>\n<li>\u9759\u7684\u306a\u72b6\u614b\u3092 S3 \u306b\u8a2d\u7f6e<\/li>\n<li>\u5b9f\u884c\u30ed\u30b0\u3084\u30e1\u30c8\u30ea\u30af\u30b9\u9078\u5b9a\u3068 CloudWatch \u306e\u5229\u7528<\/li>\n<li>nodejs , python \u3068 DynamoDB Local \u3067\u30aa\u30d5\u30e9\u30a4\u30f3\u958b\u767a\u74b0\u5883\u306e\u6574\u5099<\/li>\n<\/ul>\n<h2>\u30e2\u30e4\u30e2\u30e4\u611f<\/h2>\n<ul>\n<li>aws-sdk-cpp \u306e\u30d0\u30a4\u30ca\u30ea\u304c\u304a\u3082\u3044\u306e\u307b\u304b\u5927\u304d\u3044\u3002 .so \u306b\u3066 10M <\/li>\n<li>\u8907\u6570\u306e Lambda Function \u3092 atomic \u306b\u66f4\u65b0\u3059\u308b\u306b\u306f\u5de5\u592b\u304c\u8981\u308b<\/li>\n<li>\u66f4\u65b0\u76f4\u5f8c\u306f\u52d5\u4f5c\u304c\u9045\u3044\u3002\u901a\u5e38\u6570 ms \u3067\u5b9f\u884c\u304c\u7d42\u308f\u308b\u3068\u3053\u308d\u304c\u3001\u6570\u767e ms \u306b\u3082\u306a\u308b\u3053\u3068\u3082\u3042\u308b<\/li>\n<li>SQL \u304c\u4eba\u9593\u306b\u512a\u3057\u3044\u8a00\u8a9e\u3068\u3059\u308b\u3068\u3001 DynamoDB \u306e\u66f8\u304d\u65b9\u306f\u6a5f\u68b0\u306b\u8fd1\u304f\u3001\u305d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u62bd\u8c61\u69cb\u6587\u6728\u306b\u3082\u898b\u3048\u3066\u304f\u308b<\/li>\n<li>DynamoDB \u3067\u3082\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30e9\u30f3\u30ad\u30f3\u30b0\u3068\u3044\u3063\u305f\u7528\u9014\u306b\u306f\u3042\u307e\u308a\u5411\u3044\u3066\u3044\u306a\u3044<\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3068\u3066\u3082\u5b89\u304f\u59cb\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u5b9f\u88c5\u91cf\u3082\u5c11\u306a\u304f\u3001\u5b89\u5b9a\u6027\u304c\u975e\u5e38\u306b\u9ad8\u304f\u3001\u62e1\u5f35\u306e\u4f59\u88d5\u3082\u5341\u5206\u306b\u3042\u308a\u3001\u904b\u7528\u306e\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u305b\u3093\u3002\u30cd\u30a4\u30c6\u30a3\u30d6\u30a2\u30d7\u30ea\u306b\u30aa\u30b9\u30b9\u30e1\u3002<\/p>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/9.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/9-600x127.png\" alt=\"9\" width=\"600\" height=\"127\" class=\"alignnone size-medium wp-image-14422\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/9-600x127.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/9-276x58.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2015\/10\/9.png 724w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6628\u4eca\u4f55\u304b\u3068\u8a71\u984c\u306b\u6319\u304c\u3063\u3066\u304d\u305f AWS Lambda \u3068 AWS DynamoDB \u3092\u6d3b\u7528\u3057\u3066\u683c\u5b89\u3067\u5805\u7262\u3001\u9ad8\u6027\u80fd\u306a\u30b2\u30fc\u30e0\u30b5\u30fc\u30d0\u3092\u4f5c\u308a\u307e\u3059\u3002 \u65e2\u5b58\u30b7\u30b9\u30c6\u30e0\u306e\u82e6\u52b4\u3092\u3082\u3068\u306b\u3001\u30b5\u30fc\u30d0\u306e\u958b\u767a\u3084\u904b\u7528\u3092\u9811\u5f35\u3089\u305a\u306b\u3059\u3080\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3068\u30cd\u30a4\u30c6 [&hellip;]<\/p>\n","protected":false},"author":101,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[114,98,96,171,32,95,97],"class_list":["post-14404","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-aws","tag-c","tag-dynamodb","tag-info","tag-javascript","tag-lambda","tag-native"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/14404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/101"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=14404"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/14404\/revisions"}],"predecessor-version":[{"id":14454,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/14404\/revisions\/14454"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=14404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=14404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=14404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}