Integration Example: Amazon S3

Find out how to use the new Javascript SDK to sync your Amazon S3 buckets and object metadata into an Ardoq workspace.

Kristine Marhilevica avatar
Written by Kristine Marhilevica
Updated over a week ago

The rumors are true. Ardoq has released a fabulous new Javascript SDK.

This tutorial will guide you on how to use this to sync your Amazon S3 buckets & object metadata into an Ardoq workspace. There is a similar tutorial for AWS Lambda if that takes your fancy.

First, clone the repository with the example code. This repo will use the sync function from ardoq-sdk-js.

git clone https://github.com/ardoq/ardoq-sync-examples

Create a config.js file, by copying the file config.sample.js.

Ardoq config.js

You will need to add some credentials here. From IAM in AWS, generate a user with API access and assign the policy AmazonS3ReadOnlyAccess (admin will also work). Copy and paste the accessKeyId and secretAccessKey into the config.js file

Same for your Ardoq token:

Ardoq token

Create a blank workspace in Ardoq, and copy the workspace ID into the config, as well as your Ardoq org name. FYI - AWS workspace templates will be available soon directly from the Ardoq app!

Ardoq blank workspace

Once your configuration has been updated. You will need to install npm dependencies and run the script. The script will:

* GET bucket metadata from AWS
* For each bucket:
* GET Object metadata
* Format into Graph structure
* Sync with Ardoq workspace
* PUT changes to Ardoq

 * GET bucket metadata from AWS * For each bucket:    * GET Object metadata # This loop could take some time! Comment out if you only want the bucket info * Format into Graph structure * Sync with Ardoq workspace * PUT changes to Ardoq
npm install npm run lambda
Did this answer your question?