Coder Social home page Coder Social logo

subhamay-cloudworks / 0054-hyacinth-tf Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 5 KB

Creating a S3 bucket with lifecycle policy enabled and uploading a large file > 5 GB using S3 multipart upload.

Shell 45.60% HCL 54.40%
terraform s3-lifecycle-policy key-management-service shell-script s3-multipart-upload

0054-hyacinth-tf's Introduction

Project Hyacinth: S3 Multipart Upload

A user executes a shell script to split a large file (typically 100 MB or greater) into multiple part files. Then the script initiates the multipart upload and uploads each part file one by one. Once the part files upoload is complte the script completes the multipart upload by merging the part files into the original file.

Description

Multipart upload allows you to upload a single object as a set of parts. Each part is a contiguous portion of the object's data. You can upload these object parts independently and in any order. If transmission of any part fails, you can retransmit that part without affecting other parts. After all parts of your object are uploaded, Amazon S3 assembles these parts and creates the object. In general, when your object size reaches 100 MB, you should consider using multipart uploads instead of uploading the object in a single operation.

Project Hyacinth - Design Diagram

Getting Started

Dependencies

  • Create a Customer Managed KMS Key in the region where you want to create the stack..
  • Modify the KMS Key Policy to let the IAM user encrypt / decrypt using any resource using the created KMS Key.

Installing

  • Clone the repository in a local hard drive.
  • Give execute permission to the bash script s3_multipart_upload.sh
  • Create a S3 bucket.

Executing program

  • Change directory where you have cloned the repository and give execute permission to the script
cd <script directory>
  • Provide execute permission to the bash script s3_multipart_upload.sh
chmod 755 s3_multipart_upload.sh
  • Execute the bash script from your local system using the following command
sh ./s3_multipart_upload.sh <Filename to be uploaded> <Split size in MB> <Target Bucket Name>

Help

Post message in my blog (https://blog.subhamay.com)

Authors

Contributors names and contact info

Subhamay Bhattacharyya - [email protected]

Version History

  • 0.1
    • Initial Release

License

This project is licensed under Subhamay Bhattacharyya. All Rights Reserved.

Acknowledgments

Inspiration, code snippets, etc.

0054-hyacinth-tf's People

Contributors

subhamay-cloudworks avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.