📜 ⬆️ ⬇️

AWS SDK for Node.js released

Werner Vogel, CTO Amazon at the last conference re: Invent stated that it uses Node.js for its daily tasks. And on December 4, the official AWS SDK for Node.js was released . Now there is no need to use third-party libraries, fearing for their stability, and trying to understand their documentation.

Currently, the SDK supports:


To use, just install a new module.
npm install aws-sdk 

An example for clarity:
 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("Successfully uploaded data to myBucket/myKey"); }); }).fail(function(resp) { console.log(resp.error); }); 


Links

')

Source: https://habr.com/ru/post/161665/


All Articles