Skip to content

abilous-ti/aws-s3-nodejs-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

A Node.js application which creates an S3 bucket and uploads a file with permissions and metadata.

This example uses the createBucket and upload methods of the AWS SDK for JavaScript.

See API doocumentation for detailed information; https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html

To see the available parameters for the s3 upload method, see the paramObjects.js file.

Prerequisites

  • An AWS account with appropriate permissions to create the required resources
  • Node.js (v12+) and npm (v6+) installed and configured for use with AWS
  • Bash environment in which to execute the scripts
  • A jpg file in the executing directory called koala.jpg

Run the code

The code can be executed as follows:

node s3PutObject.js

Demo Ubuntu 20.04

sudo apt-get install unzip
wget https://github.com/abilous-ti/aws-s3-nodejs-demo/archive/refs/heads/main.zip
unzip main.zip

cd aws-s3-nodejs-demo-main/

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

npm install
node s3PutObject.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published