简体   繁体   中英

How to access files stored in s3 bucket from python program without use of boto3?

I want to access files stored in my s3 buckets running python script in ec2 machine . Boto3 python packages facilitates this but is there some other way files stored in the s3 bucket could be accessed simply providing url of s3 bucket rather than importing boto3 in python program ?

AWS CLI and shell scripts instead of writing a python application and installing boto3 is what I recently did. I worried about python version being installed and didn't want to install boto3, we were using a variant of an Amazon Linux which all will have AWS CLI and will also have installed jq command tool is a great way to get around installing boto3. It can be supplement with python as well. I decided to go with shell scripting, because my program was relatively simple.

I would seriously question WHY you do not want to use Boto to write your app. But if you can not include Boto as a dependency, the solution is to code yourself the low level API call to Amazon S3. Boto (as all AWS SDK) is just a "wrapper" around the HTTPS / JSON API to allow you to write fewer lines of code, do not manually manage the URL signature process and, ultimately, focus on your business logic and not on the "wiring"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM