|
182 | 182 | }, |
183 | 183 | "outputs": [], |
184 | 184 | "source": [ |
185 | | - "document_url = \"s3://bedrock-data-automation-prod-assets-us-west-2/demo-assets/Document/BankStatement.jpg\"\n", |
186 | | - "\n", |
187 | 185 | "local_download_path = \"data/documents/\"\n", |
188 | 186 | "local_file_name = \"BankStatement.jpg\"\n", |
189 | 187 | "file_path_local = f\"{local_download_path}/{local_file_name}\"\n", |
190 | 188 | "os.makedirs(local_download_path, exist_ok=True)\n", |
191 | 189 | "\n", |
192 | 190 | "# Download Sample file\n", |
193 | | - "(bucket, key) = get_bucket_and_key(document_url)\n", |
194 | | - "response = s3_client.download_file(bucket, key, file_path_local)\n", |
| 191 | + "#(bucket, key) = get_bucket_and_key(document_url)\n", |
| 192 | + "#response = s3_client.download_file(bucket, key, file_path_local)\n", |
195 | 193 | "\n", |
196 | 194 | "# Upload the document to S3\n", |
197 | | - "file_name = Path(file_path_local).name\n", |
198 | | - "document_s3_uri = f'{bda_s3_input_location}/{file_name}'\n", |
| 195 | + "document_s3_uri = f'{bda_s3_input_location}/{local_file_name}'\n", |
199 | 196 | "\n", |
200 | 197 | "target_s3_bucket, target_s3_key = get_bucket_and_key(document_s3_uri)\n", |
201 | 198 | "s3_client.upload_file(file_path_local, target_s3_bucket, target_s3_key)\n", |
|
502 | 499 | "name": "python", |
503 | 500 | "nbconvert_exporter": "python", |
504 | 501 | "pygments_lexer": "ipython3", |
505 | | - "version": "3.11.11" |
| 502 | + "version": "3.11.10" |
506 | 503 | } |
507 | 504 | }, |
508 | 505 | "nbformat": 4, |
|
0 commit comments