DynamoDB Deployment

Set Up the Environment

To set up AmazonDB it is essential to correctly configure the personal computer correctly. The cloud integration utilises node.js, python 2/3 and the AWS Command Line Interface. Ensure that these programs are downloaded and added to the system’s path. To successfully execute the following scripts, it is paramount to configure the AWS settings with the IAM keys.

Step 1: Download the required languages

Step 2: Create AWS Account and Setup the Identity & Access Management

  • Access the AWS account online and click on IAM in the console
  • Create a group and name it. e.g. cloud team
  • Under group, add in the required users
  • When creating the users, ensure to attach the required policies (AmazonS3FullAccess, AmazonDynamoDBFullAccess, AWSElasticBeanstalkFullAccess)
  • During this process Amazon will auto-generate Access Keys. This will allow the users to use the cloud services using the command line

Step 3: Establish AWS Access

  • In the command line type:
$ aws configure
  • Use the Access Key generated by Amazon to authenticate the user

Step 4: Obtain CSC’s codes

  • After establishing cloud access, the authenticated user can fully utilise S3, EBS and DynamoDB via the command line
  • The required codes are taken from the DustyDynamo repository.
  • Using Gitbash go to a designated directory and clone the DustyDynamo repository.
  • In Gitbash type:
$ git clone https://github.com/CloudSevenConsulting/DustyDynamo.git

Step 5: Use CSC’s codes to establish the DynamoDB Cloud Database

  • All of the required codes are found in the src folder
  • A summary has been provided for the codes purpose

NetworkDataCreation.js

This script creates the “NetworkData” DynamoDB Table with a composite primary key. This composite key is associated with a MoteID partition key and a Timestamp sort key

CSVtoJSON.py

This script converts a csv file into a json file which is used in populating the DynamoDB database

NetworkDataMockLoad.js

This script populates the DynamoDB database using json files

NetworkQuery.py

This script queries the DynamoDB database in 2017 and orders it from the most recent timestamps. This data is then written into a csv file and stored locally on the computer

S3Upload.py

This script requires the user to insert input their IAM key to upload the csv data into an S3 bucket

NetworkDataDeletion.js

This script deletes the “NetworkData” DynamoDB Table