Category Archives: S3

Are you planning to move your existing GB’s or TB’s data to s3?
Below nodejs script might help you to get started and upload your data to S3.


Ensure that aws-sdk node module is configured. If not follow AWS documentation

s3 Options:

Usually accessKeyId and secretAccessKey is enough to make it happening. But if you are behind proxy, use those commented s3Options fields accordingly.

Source Directory

For windows directory delimiter needs tobe delimited, eg c:\\mysite\\uploads

For Linux you can use something like ‘/var/www/site/uploads’


Use Case:

A PHR(Patient Health Record) application  gets health reports of patient from various hospitals and labs. Patient Health records are in XML format which needs to be processed  and stored into Database.

Lets see how we can use Amazon AWS to implement this use case.

Step1: Create a Amazon Simple Storage Service (S3) bucket where documents to be uploaded.

Step2: Create a AWS Lambda Function  using NodeJs. Configure  Lambda function to get triggered on   XML upload to S3. Check below screen shot.


Create a Mysql Database using AWS Relational Database‎ (RDS).

Step 4: 

Lambda NodeJs code can be dowloaded from Wavelabs Git Repo.

Package the JS file into zip file and upload the NodeJS Lambda function. Make necessary changes in index.js file as per your requirements.


From AWS dashboard, upload  sample xml file( use file  patient.xml from repo) to s3 bucket.

Connect to Mysql using command line or using workbench and see the results.