Backing up JEDI One Data to AWS

In Part1 we created a zip file of the acquired JEDI One data.  Here we will list the steps needed to setup and store the file in the cloud using Amazon Web Services (AWS), specifically the S3 storage component.  

  1. Create a free AWS account
  2. Create an S3 bucket  Note: Do not activate public access, it is not needed.  Remember your bucket name.
  3. Login to AWS Console
  4. In the upper right hand corner of the console, click on your name and then navigate to:  My Security Credentials -> Access Keys -> Create New Access Key
  5. Download the keys.  You will need both the access key ID and the secret access key.  Keep these handy (and secure).

Now go back to your raspberry Pi terminal window and enter the following:

$sudo apt update
$sudo apt full-upgrade
$sudo pip3 install boto3

 You've just updated your Pi and installed the Amazon AWS library for Python v3.

In your home directory, create a sub-directory called .aws  (don't forget the dot)

$cd ~
$mkdir .aws
$sudo chmod 777 ~/.aws

Create two files under the .aws sub-directory (you can use Text Editor on the Raspberry Pi -> Accessories):

Call this file, credentials (no extension).  Contents of file:

aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY

Make sure you enter in the access and secret keys from step 5 above.

Create a second file under .aws called, config (no extension).  Contents of file:


Enter the appropriate region for your location - Available Regions

To test that you have done all of this correctly, run the following Python code on your Raspberry Pi:

import boto3

s3 = boto3.resource('s3')

for bucket in s3.buckets.all():

 This will list all the buckets you have by name, like this (I only have one):


Now to write the backup file from Part 1 to the cloud bucket, run this Python code:

import boto3

target_bucket = "drm-test-jedi-one"
source_filename = "/home/pi/jedi/"
target_filename = ""

s3 = boto3.resource('s3')
f = open(source_filename, 'rb')
except OSError:
print('cannot open', source_filename)
s3.Bucket(target_bucket).put_object(Key=target_filename, Body=f)

 If all goes well, it will just return the shell prompt:


Finally go to your AWS console and check for the file (select Storage S3 -> bucket name):


Congratulations, your data zip-file is now stored in the cloud.







Was this article helpful?
0 out of 0 found this helpful