July 2018
Intermediate to advanced
350 pages
8h 47m
English
On macOS or Linux, create a credentials file at ~/.aws/credentials, or on Windows create a file at C:\Users\USERNAME\.aws\credentials:
[default]aws_access_key_id = your_access_keyaws_secret_access_key = your_secret_key
You can find more instructions at http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-intro.html on how to configure AWS access keys.
After you have installed the aws-sdk Node.js SDK, adding the following line will load the AWS Node.js JavaScript files into your application:
const AWS = require('aws-sdk');
The following code sample shows how to create an S3 bucket and write an object to that bucket. For this example to work, the preceding credentials that you added to the credentials file should have access ...