简体   繁体   English

我可以使用 https 从私有 S3 存储桶下载对象而不公开存储桶或对象吗?

[英]Can I download an object from private S3 bucket using https without making bucket or object public?

I'm trying to download an object from a private S3 bucket using HTTPS.我正在尝试使用 HTTPS 从私有 S3 存储桶下载对象。 But the URL returns Access Denied.但 URL 返回拒绝访问。 Can I download an object using credentials(AccessKeyId & SecretAccessKey) via HTTPS?我可以通过 HTTPS 使用凭据(AccessKeyId 和 SecretAccessKey)下载对象吗?

You can do it using the AWS SDK class AmazonS3URI as per below:您可以使用 AWS 开发工具包类 AmazonS3URI 来完成,如下所示:

URI fileToBeDownloaded = new URI(" https://s3.amazonaws.com/account-update/inputtest.csv"); 

AmazonS3URI s3URI = new AmazonS3URI(yourfileToBeDownloaded);

S3Object s3Object = s3Client.getObject(s3URI.getBucket(), s3URI.getKey());

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将AWS S3中的对象从私有存储桶复制到公共存储桶而不进行下载? - How to copy object in aws s3 from private bucket to public bucket without downloading? 如何在不使用预签名 URL 的情况下在 s3 私有存储桶中公开 s3 对象 - How to make an s3 object public in s3 private bucket without using presigned URLs 如何限制用户将公共 S3 object 创建到私有存储桶中 - How to restrict users to create a public S3 object into a private bucket 如何在不公开对象文件夹的情况下访问 S3 存储桶中的对象 - How to access objects in S3 bucket, without making the object's folder public 我可以在不将存储桶权限更改为公共的情况下使用 cloudflare 访问 S3 存储桶吗 - Can I access S3 bucket using cloudflare without changing the bucket permission to public 如何使用golang从公共s3存储桶下载 - How to download from public s3 bucket using golang 无法创建 S3 对象,使用 Lambda 从另一个账户上的 S3 存储桶复制,公共 - Unable to make S3 object, copied from S3 bucket on another account using Lambda, public 如何在不公开的情况下将文件从一个S3存储桶访问到另一个存储桶? - How to access files from one S3 bucket into another bucket without making them public? s3存储桶对象URL不是私有的 - s3 bucket object URL is not private 如何使用PHP从AWS S3 Bucket下载对象? - How to download an Object from AWS S3 Bucket with PHP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM