A complete Python application to automatize the process of uploading files to Amazon S3

Overview

Python version MIT license

Upload files or folders (even with subfolders) to Amazon S3 in a totally automatized way taking advantage of:

  • Amazon S3 Multipart Upload: The uploaded files are processed transparently in parts improving the throughput and the quick recovery from any network issues.

  • Resilent Retry System: Intelligent S3 Upload has been built to detect any error during the uploading process and to perform any retries whenever is necessary.

  • User Friendly Interface: Just check the demo to see with your own eyes how the upload process is performed.

Checkout the demo

Installation

Clone the repository

git clone https://github.com/polius/intelligent-s3-upload.git

Install the dependencies

python3 -m pip install boto3 --user
python3 -m pip install requests --user

Setup

Before executing the Intelligent S3 Upload, modify the credentials.json file.

{
    "aws_access_key_id": "",
    "aws_secret_access_key": "",
    "region_name": "",
    "bucket_name": "",
    "bucket_prefix": "",
    "storage_class": "",
    "skip_s3_existing_files": true,
    "server_side_encryption": true,
    "slack_url": ""
}
  • aws_access_key_id | aws_secret_access_key: Credentials generated by Amazon IAM.
  • region_name: The AWS Region Code where the bucket is located.
  • bucket_name: The bucket name created by Amazon S3.
  • bucket_path: (Optional) The bucket path to store the uploaded objects.
  • storage_class: The type of storage to use for the uploaded object. These are the possible values:
storage_class
STANDARD
REDUCED_REDUNDANCY
STANDARD_IA
ONEZONE_IA
INTELLIGENT_TIERING
GLACIER
DEEP_ARCHIVE
OUTPOSTS
  • skip_s3_existing_files: Skip uploading objects if these already exists in S3. Possible values: [ true | false ]
  • server_side_encryption: Enable Server-side encryption using the Amazon S3 key (SSE-S3). Possible values: [ true | false ]
  • slack_url: (Optional) Enter a Webhook URL to send a message to Slack when a upload finishes.

AWS Policy

To be able to run the script check that your policy meets the following requirements:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:ListBucketMultipartUploads",
                "s3:AbortMultipartUpload",
                "s3:ListBucket",
                "s3:ListMultipartUploadParts"
            ],
            "Resource": [
                "arn:aws:s3:::yourbucket/*",
                "arn:aws:s3:::yourbucket"
            ]
        }
    ]
}

Execution

python3 upload.py --path "{PATH}"

Replace the {PATH} string with the absolute file/folder path.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

You might also like...
An Amazon Product Scraper built using scapy module of python

Amazon Product Scraper This is an Amazon Product Scraper built using scapy module of python Features it scrape various things Product Title Product Im

A delightful and complete interface to GitHub's amazing API

ghapi A delightful and complete interface to GitHub's amazing API ghapi provides 100% always-updated coverage of the entire GitHub API. Because we aut

rewise is an unofficial wrapper for google search's auto-complete feature

rewise is an unofficial wrapper for google search's auto-complete feature

Complete portable pipeline for masking of Aadhaar Number adhering to Govt. Privacy Guidelines.
Complete portable pipeline for masking of Aadhaar Number adhering to Govt. Privacy Guidelines.

Aadhaar Number Masking Pipeline Implementation of a complete pipeline that masks the Aadhaar Number in given images to adhere to Govt. of India's Priv

An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot

Adv Auto Filter Bot V2 This Is Just An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot.. Just Sent Any Text As Query It Wi

A Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot

Adv Auto Filter Bot This Is Just An Simple Advance Auto Filter Bot Complete Rewritten Version Of Adv-Filter-Bot.. Just Sent Any Text As Query It Will

ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

A simple library for interacting with Amazon S3.

BucketStore is a very simple Amazon S3 client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in

The algorithm performs a simple user registration (Name, CPF, E-mail and Telephone) in an Amazon RDS database and also performs the storage, training and facial recognition of the user's face to identify the users already registered in the system in a next time the user is seen.
Comments
  • Too many parts for large objects upload

    Too many parts for large objects upload

    Hello,

    First, many thanks for your work on this application that frankly save many time for my uploads !

    I ran into a bug for big files that generate many parts. I got this error of the s3api : "Part number must be an integer between 1 and 10000"

    Here my upload attempt cutting my file in 10245928236 parts ? (I think there is also a bug here while calculating number of parts)

    +==================================================================+ โ€– Intelligent S3 Upload โ€– +==================================================================+

    • Scanning files...
    • Starting the upload process... [0.00%] [76.34 GB] 2016.tar.gpg (0.00%) [Part 10001/10245928236] [Attempt 1/3] Multipart upload process failed. Retrying in 5 seconds... [0.00%] [76.34 GB] 2016.tar.gpg (0.00%) [Part 10001/10245928236] [Attempt 2/3] Multipart upload process failed. Retrying in 5 seconds... [0.00%] [76.34 GB] 2016.tar.gpg (0.00%) [Part 10001/10245928236] [Attempt 3/3] Multipart upload process failed. Retrying in 5 seconds...
    • Multipart upload process failed after 3 attempts. Error: An error occurred (InvalidArgument) when calling the UploadPart operation: Part number must be an integer between 1 and 10000, inclusive
    • Overall Time: 0:10:05.450184

    I'll try to debug as soon as I have the time, but I submit this issue to avoid forgetting :)

    Regards,

    Adrien

    opened by AdrienBigot 1
Releases(v.1.0.4)
Owner
Pol Alzina
Iโ€™m a Database Engineer with experience designing, coding, scripting, testing and supporting next generation database solutions in Amazon Web Services.
Pol Alzina
Uploader-Bot - A Modified Telegram Url Uploader Bot With Mongodb, Zee5, Sonyliv Support and Many Other Yt-dlp Sites

๐š๐šŽ๐šš๐šž๐š’๐š›๐šŽ๐š ๐š…๐šŠ๐š›๐š’๐šŠ๐š‹๐š•๐šŽ๐šœ ๐Ÿ”Š APP_ID API_HASH TG_BOT_TOKEN DATABASE_URL

11 Sep 10, 2022
Coinbase Listing Sniper

Coinbase Listing Sniper Script that listens to the @CoinbaseAssets twitter to find information about new Coinbase listings, and automatically buys 100

4 Oct 26, 2022
Sielzz Music adalah proyek bot musik telegram, memungkinkan Anda memutar musik di telegram grup obrolan suara.

Hi, I am: Requirements ๐Ÿ“ FFmpeg NodeJS nodesource.com Python 3.8 or higher PyTgCalls MongoDB Get STRING_SESSION from below: ๐ŸŽ– History Features ๐Ÿ”ฎ Th

1 Nov 29, 2021
A python based all-in-one tool for Google Drive

gdrive-tools A python based all-in-one tool for Google Drive Uses For Gdrive-Tools โœ“ generate SA โœ“ Add the SA and Add them to TD automatically โœ“ Gener

XcodersHub 32 Feb 09, 2022
this is an op music pyrogram music bot.

amanrajputpytgcallmusic this is an op music pyrogram music bot..... this bot user music bot can play music without being admin...... TG-MusicPlayer A

2 Dec 27, 2021
LOL-banner - A discord bot that bans anybody playing league of legends

LOL-banner A discord bot that bans anybody playing league of legends This bot ha

bsd_witch 46 Dec 17, 2022
Framework to collect and process weather data from wttr.in.

Weathercrawler Automatic extraction and processing framework for weather data from wttr.in Installation tested with: Python 3.7.3 Python 3.9.4 git clo

Maurice Gรผnder 0 Jul 26, 2021
Telegram Group Management Bot based on Pyrogram

Komi-San Telegram Group Management Bot based on Pyrogram More updates coming soon Support Group Open a Pull request if you wana contribute Example for

33 Nov 07, 2022
A simple use library for bot discord.py developers

Discord Bot Template It's a simple use library for bot discord.py developers. Ob

Tir Omar 0 Oct 16, 2022
To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window

To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window Insp

Ritin George 6 Mar 11, 2022
Automatically check for free Anmeldung appointments.

Berlin Anmeldung Appointments (Python) This Python script will automatically check for free Anmeldung appointments in Berlin, and find them for you. T

Martรญn Aberastegue 6 May 19, 2022
S3-cleaner - A Python script attempts to delete the all objects/delete markers/versions from specific S3 bucket

Remove All Objects From S3 Bucket This Python script attempts to delete the all

9 Jan 27, 2022
Streaming Finance Data with AWS Lambda

A data pipeline consisting of an AWS lambda function reading data from yfinance API, an AWS Kinesis stream to receive & store data in S3 buckets and AWS Glue crawler & Athena to run SQL queries.

Aarif Munwar Jahan 4 Aug 30, 2022
Infrastructure template and Jupyter notebooks for running RoseTTAFold on AWS Batch.

AWS RoseTTAFold Infrastructure template and Jupyter notebooks for running RoseTTAFold on AWS Batch. Overview Proteins are large biomolecules that play

AWS Samples 20 May 10, 2022
A discord bot that will help you browse/download nhentai sources.

Risa Introduction Risa is an nHentai discord bot that will help you browse and download your favorite doujin inside your own discord server. Hosting M

markee7 14 Oct 25, 2021
ไฝฟ็”จappium่ฟ›่กŒๆŠ–้Ÿณ็ฒ‰ไธ็š„่‡ชๅŠจๅŒ–่Žทๅ–

DYfans ไฝฟ็”จappium่ฟ›่กŒๆŠ–้Ÿณ็ฒ‰ไธ็š„่‡ชๅŠจๅŒ–่Žทๅ– ๅทฅๅ…ท๏ผš appium appium inspector Fiddler ๅคœ็ฅžๆจกๆ‹Ÿๅ™จๆˆ–่€…ๅฎ‰ๅ“ๆ‰‹ๆœบ mitmdump mitmproxy ๆŽจ่ไฝฟ็”จๅฎ‰ๅ“5.0ๅคœ็ฅžๆจกๆ‹Ÿๅ™จ ๅบ“๏ผš appium selenium json ็Žฏๅขƒ๏ผš jdk ๅฎ‰ๅ“sdk ๅฎ‰ๅ“

kaba 0 Mar 25, 2022
Python library for generating sequences with uniform stimulus history

Sampling Euler tours for uniform stimulus history Table of Contents About Examples Experiment 1 Experiment 2 Experiment 3 Experiment 4 Experiment 5 Co

5 Nov 11, 2021
Data from popular CS:GO website hltv.org

Welcome to hltv-data ๐Ÿ‘‹ ๐ŸŽฎ Data from popular CS:GO website hltv.org Install pip install hltv-data Usage The public methods can be reached using HLTVCl

Dariusz Choruลผy 28 Dec 23, 2022
Whatsapp-APi Wrapper From rzawapi.my.id

Whatsapp-APi Wrapper From rzawapi.my.id

Rezza Priatna 2 Apr 19, 2022