A simple *blazingly fast* Rust library to unzip an S3 archive without downloading.

Overview

S3-unzip

A simple blazingly fast Rust library to unzip an S3 archive into S3's root directory. Works without downloading the archive or putting it into RAM, so will unzip a huge dataset archive even if run on t2.micro(restrictions apply).

Capabilities

  • Works without downloading the archive or putting it into RAM, so will unzip a huge dataset archive even if run on t2.micro

Restrictions

  • The only condition for it to work currently is that your machine has more RAM then the largest archive's file.
  • If you want to add streaming the files directly to S3 as they get unzipped you can make a PR, we will be very thankful for that!
  • May not work with archives generated with macos archiver. Guaranteed to work with archives produced from zip.

Usage

s3-unzip -v -r [region_name] -p [prefix_name]

  • -v turns on verbose mode. Prints the files to the stdout as they unpack
  • pass -r [region_name] to specify region name. us-east-1 by default.
  • pass -p [prefix_name] to prefix all unpacked S3 object keys with a value. This evvectively puts the unpacked files into a folder is you specify something like -p path/to/folder/
  • specify and to find the archive.

Credentials

For the program to find your credentials, aws configure them with the aws-cli client on your machine. Note that those must have access to your bucket or global access.

Cross-compilation

If you want to cross-compile this to your EC2 instance from a macOS host, you might try these steps (linker installation procedure may differ in your case):

  1. Add the new target using rustup: rustup target add x86_64-unknown-linux-gnu
  2. Install the cross-platform linker using brew: brew tap SergioBenitez/osxct && brew install x86_64-unknown-linux-gnu
  3. Compile using a custom linker: CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc cargo build --target=x86_64-unknown-linux-gnu --release.
  4. Your binary is now in target/x86_64-unknown-linux-gnu/release/s3-unzip. You might want to copy it to the server using scp and use screen -d -m to execute it in the background (see screen docs for details).

Lambda usage

This package is not lambda-compatible since lambda limits the execution time to 15 minutes. If you want to make it compatible, though, feel free to make a PR.

You might also like...
A tool to run web applications on AWS Lambda without changing code.
A tool to run web applications on AWS Lambda without changing code.

AWS Lambda Adapter A tool to run web applications on AWS Lambda without changing code. How does it work? AWS Lambda Adapter supports AWS Lambda functi

tri-angle trader without trade, just watch pair's price change, print arbtrage chance.

tri-angle trader without trade, just watch pair's price change, print arbtrage chance.

You can name anonymous Future from async fn without dyn or Box!

rename-future You can name anonymous Future from async fn without dyn or Box! PLEASE READ THIS THIS PROJECT NOT YET WELL TESTED! DON'T USE THIS IN PRO

An iterator adapter to peek at future elements without advancing the cursor of the underlying iterator.

multipeek An iterator adapter to peek at future elements without advancing the cursor of the underlying iterator. Check out the documentation for more

Peekable iterator that allows to peek the next N elements without consuming them.

peekaboo docs - crates.io Peekable iterator that allows to peek the next N elements without consuming them. It's no_std compatible by default. It also

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.
messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code. Goals Al

The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying the function code.
The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying the function code.

Chaos Extension - Seamless, Universal & Lightning-Fast The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying

Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.
Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.

Multi functional app to find duplicates, empty folders, similar images etc.

A simple, fast, easy README generator
A simple, fast, easy README generator

Welcome to Readme Generator A simple, fast, easy README generator. Never worry about READMEs again! What it does: Run the command in your project's di

Owner
Mykhailo Bondarenko
🤖 Passionate about ML, DL, and AI in general 📈 Entrepreneur in soul, startup maker. More than ready to collaborate 🎵 I express myself in music
Mykhailo Bondarenko
A simple web-app allowing you to batch archive groups of repositories from a given organization

ice-repos My goal here is to build a simple web-app allowing you to batch archive groups of repositories from a given organization, using Rust+Yew. As

Nic McPhee 6 Nov 5, 2022
Rust crate which provides direct access to files within a Debian archive

debarchive This Rust crate provides direct access to files within a Debian archive. This crate is used by our debrep utility to generate the Packages

Pop!_OS 11 Dec 18, 2021
Byte is a blazingly fast🚀 Discord Bot with a user-friendly design using twilight written in rust🦀.

Byte Byte is a blazingly fast?? Discord Bot with a user-friendly design using twilight written in rust??. How To Run There is a public version of the

TakoTheDev 3 Nov 15, 2023
Online-statistics is crate 🦀 for Blazingly fast, generic and serializable online statistics

Online statistics in Rust ?? for Blazingly fast, generic and serializable online statistics. Quickstart Let's compute th

Adil Zouitine 29 Dec 30, 2022
Build your service-server fast, easy (and without hosting!)

service-io is a library to build servers that offering services with really little effort. Choose an input connector. Choose an output connector. Choo

Luis Enrique Muñoz Martín 34 Jan 4, 2023
Reload Rust code without app restarts. For faster feedback cycles.

hot-lib-reloader hot-lib-reloader is a development tool that allows you to reload functions of a running Rust program. This allows to do "live program

Robert Krahn 274 Jan 1, 2023
A Rust framework to develop and use plugins within your project, without worrying about the low-level details.

VPlugin: A plugin framework for Rust. Website | Issues | Documentation VPlugin is a Rust framework to develop and use plugins on applications and libr

VPlugin 11 Dec 31, 2022
hado-rshado — A little macro for writing haskell-like do expressions without too much ceremony

hado Monadic haskell-like expressions brought to rust via the hado! macro What? A little macro for writing haskell-like do expressions without too muc

Lucas David Traverso 44 Jul 31, 2022
A framework for iterating over collections of types implementing a trait without virtual dispatch

zero_v Zero_V is an experiment in defining behavior over collections of objects implementing some trait without dynamic polymorphism.

null 13 Jul 28, 2022
Add nice user-facing diagnostics to your errors without being weird about it.

thisdiagnostic is a Rust library for adding rich diagnostic metadata to errors, for some really fancy and customizable error reporting!

Kat Marchán 14 Feb 2, 2022