Skip to Content
Hands-On Serverless Computing
book

Hands-On Serverless Computing

by Kuldeep Chowhan
July 2018
Intermediate to advanced
350 pages
8h 47m
English
Packt Publishing
Content preview from Hands-On Serverless Computing

Configuration

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn AWS Serverless Computing

Learn AWS Serverless Computing

Scott Patterson
Erlang and OTP in Action

Erlang and OTP in Action

Eric Merritt, Richard Carlsson, Martin Logan

Publisher Resources

ISBN: 9781788836654Supplemental Content