Local Zip Files Transferred to S3

0

I have a number of local files sitting on a Windows 10 desktop in .Zip format that I am needing uploaded to a S3 bucket. I am comfortable with Python (preferred language) and would be open to learning Node.js or JS for a part of the solution. Guidance on this is appreciated.

質問済み 2年前2110ビュー
2回答
0

The AWS SDK for Python provides a pair of methods to upload a file to an S3 bucket. Here's the Boto3 documentation on using those two methods.

If instead of using python, you want just a quick one liner using the AWS CLI, here's more info on that. As an example, it'd look something like this:

aws s3 cp filename.txt s3://bucket-name

Lastly, don't forget you can just upload directly to S3 via the AWS Console without writing any code. Steps are listed out here.

All three methods still require correct IAM permissions to upload to an S3 bucket, so ensure those exist too! Hope this helps!

AWS
AWSJoe
回答済み 2年前
  • I can't upload the files in .Zip format to the S3 bucket is the catch. They must be transferred in .Zip format, unzipped, then transferred to the S3 bucket.

  • Then the S3-uncompressor @kentrad mentioned would likely be the best option. For large scale data migrations there's also DataSync, but that sounds like it may be overkill. One of the key features is compression during transfer so you could leave the data unzipped and DataSync could still quickly transfer it to S3. That being said an agent is required in the form of a virtual machine that actually migrates the data.

0

You can do this with a Lambda function to unzip the file once it transfers. Here is an example: s3-uncompressor.

profile pictureAWS
エキスパート
kentrad
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ