How to Download to an S3 Bucket
The following article will cover the process for downloading material to an S3 bucket. Some pre-contextual information needed for this process is that upon uploading to S3 the item is stored as an S3 object, you can have an unlimited number of objects in a bucket; but before doing so you will need to set permissions for the bucket.
The steps required for downloading to an S3 bucket are:
- Sign into the AWS Management Console and left-click on S3
- Within the resulting window select the name of the created bucket
- After navigating into the desired S3 bucket the left-click on the upload button this will allow you to either upload multiple files or a folder (to be noted that you are able to drag and drop into this window)
- If desired object properties can be configured before upload using additional upload options
- Modify the Access Control List (ACL) permissions found underneath the Permissions tab
- If Metadata should be added left click on the Add Metadata button
- After inserting the metadata click upload to finish the process
This process can also be scripted in python with boto3 as follows:
- import boto3
- from botocore.exceptions import NoCredentialsError
- ACCESS_KEY = 'XXXXXXXXXXXXXXXXXXXXXXX'
- SECRET_KEY = 'XXXXXXXXXXXXXXXXXXXXXXX'
- def upload_to_aws(local_file, bucket, s3_file):
- s3 = boto3.client('s3', aws_access_key_id= ACCESS_KEY, aws_secret_access_key = SECRET_KEY)
- try:
- s3.upload_file(local_file, bucket, s3_file)
- print("Upload Successful")
- return True
- except FileNotFoundError:
- print("The file was not found")
- return False
- except NoCredentialsError:
- print("Credentials not available")
- return False
- uploaded = upload_to_aws('local_file', 'bucket_name', 's3_file_name')
Related Articles
How to Connect AWS to SharePoint Data Source
The following document will cover the process for connecting to a SharePoint data source within AWS: To start off this processes the user will need to navigate to the AWS Management Console then proceed to Amazon Kendra Expand the side menu and ...
Second Modified Soil Adjusted Vegetation Index (MSAVI2)
Why do I need Earth observation data processing? While our eyes only detect a fraction of all light available, satellite sensors can actually capture – and send back – much more information. Furthermore, this information is relayed back to us in a ...
Kompsat-2
KOMPSAT (Korean Multi-Purpose Satellite) program is a part of Korean government’s space development program, which aims at providing very high resolution satellite imagery to national and international remote sensing society. Since the first launch ...
Kompsat-3A
Kompsat-3A KOMPSAT (Korean Multi-Purpose Satellite) program is a part of Korean government’s space development program, which aims at providing very high resolution satellite imagery to national and international remote sensing society. Since the ...
Kompsat-3
KOMPSAT (Korean Multi-Purpose Satellite) program is a part of Korean government’s space development program, which aims at providing very high resolution satellite imagery to national and international remote sensing society. Since the first launch ...