10. Introduction to Data Storage on Cloud Services (AWS)
Activity 10.01: Transforming a Table Schema into Document Format and Uploading It to Cloud Storage
Solution
- Create a directory called
Activity10.01
in theChapter10
directory to store the files for this activity. - Open your Terminal (macOS or Linux) or Command Prompt (Windows), navigate to the
Chapter10
directory, and type injupyter notebook
. - In the Jupyter Notebook, click the
Activity10.01
directory, create a notebook file with a Python 3 kernel, and add the following code:import os import json import boto3 import shutil import pandas as pd # set your bucket name here # 'ch10-data' is NOT your bucket. It's just an example here # you should replace your bucket below BUCKET_NAME = 'ch10-data' # 1. download data from S3 bucket s3_resource = boto3.resource('s3') try: s3_resource.Bucket(BUCKET_NAME).download_file( &...