{"id":161665,"date":"2012-12-06T16:40:03","date_gmt":"2012-12-06T12:40:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=161665"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=161665","title":{"rendered":"<span class=\"post_title\">\u0412\u044b\u0448\u0435\u043b AWS SDK \u0434\u043b\u044f Node.js<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412\u0435\u0440\u043d\u0435\u0440 \u0424\u043e\u0433\u0435\u043b\u044c, CTO Amazon \u043d\u0430 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0439 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/reinvent.awsevents.com\/\">re:Invent<\/a> \u0437\u0430\u044f\u0432\u0438\u043b, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Node.js \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0410 4 \u0434\u0435\u043a\u0430\u0431\u0440\u044f \u0432\u044b\u0448\u0435\u043b \u043e\u0444\u0438\u0446\u0438\u043b\u044c\u043d\u044b\u0439 <a href=\"http:\/\/aws.amazon.com\/sdkfornodejs\/\">AWS SDK \u0434\u043b\u044f Node.js<\/a>. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043e\u043f\u0430\u0441\u0430\u044f\u0441\u044c \u0437\u0430 \u0438\u0445 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 SDK \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442:  <\/p>\n<ul>\n<li>Amazon Simple Storage Service<\/li>\n<li>Amazon Elastic Compute Cloud<\/li>\n<li>Amazon DynamoDB,<\/li>\n<li>Amazon Simple Workflow Service<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c  <\/p>\n<pre><code class=\"bash\">npm install aws-sdk<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438:  <\/p>\n<pre><code class=\"javascript\">var AWS = require('aws-sdk'); AWS.config.loadFromPath('.\/path\/to\/credentials.json'); AWS.config.update({region: 'us-east-1'}); var s3 = new AWS.S3(); s3.client.createBucket({Bucket: 'myBucket'}).done(function(resp) {   var data = {Bucket: 'myBucket', Key: 'myKey', Body: 'Hello!'};   s3.client.putObject(data).done(function(resp) {     console.log(&quot;Successfully uploaded data to myBucket\/myKey&quot;);   }); }).fail(function(resp) {   console.log(resp.error); }); <\/code><\/pre>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438  <\/p>\n<ul>\n<li> <a href=\"http:\/\/docs.amazonwebservices.com\/nodejs\/latest\/dg\/nodejs-dg-aws-sdk-for-node.js.html\"> Getting Started Guide<\/a> <\/li>\n<li> <a href=\"http:\/\/docs.amazonwebservices.com\/AWSJavaScriptSDK\/latest\/frames.html\">API Reference<\/a> <\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/161665\/\"> http:\/\/habrahabr.ru\/post\/161665\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412\u0435\u0440\u043d\u0435\u0440 \u0424\u043e\u0433\u0435\u043b\u044c, CTO Amazon \u043d\u0430 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0439 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/reinvent.awsevents.com\/\">re:Invent<\/a> \u0437\u0430\u044f\u0432\u0438\u043b, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Node.js \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0410 4 \u0434\u0435\u043a\u0430\u0431\u0440\u044f \u0432\u044b\u0448\u0435\u043b \u043e\u0444\u0438\u0446\u0438\u043b\u044c\u043d\u044b\u0439 <a href=\"http:\/\/aws.amazon.com\/sdkfornodejs\/\">AWS SDK \u0434\u043b\u044f Node.js<\/a>. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043e\u043f\u0430\u0441\u0430\u044f\u0441\u044c \u0437\u0430 \u0438\u0445 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-161665","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/161665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161665"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/161665\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}