Direkt zum Inhalt

How to download file from others S3 bucket

0

Hi, I am new to use AWS. I want download the data from others S3 bucket (I get the Access Key Id and Secret Access Key).

After I download CLI and finish configuration by given Access Key Id and Secret Access Key, the terminal shows 'An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied', when I use the aws s3 ls.

Did I ignore any steps?

gefragt vor einem Jahr1521 Aufrufe
2 Antworten
1

Hello,

Ensure that an IAM user has a required permissions to make calls to S3 API.

Changing permissions for an IAM user: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html

The minimum required permissions to access all the objects in a bucket might look like this:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::your-specific-bucket",
        "arn:aws:s3:::your-specific-bucket/*"
      ]
    }
  ]
}
EXPERTE
beantwortet vor einem Jahr
EXPERTE
überprüft vor einem Jahr
  • Thank you very much! I am just given the Access Key Id and Secret Access Key; in this case, should I ask the person who gave me these two keys for checking the permissions? or Is there any another way to sync data to my bucket and then I could download the data?

0

Yes, you need to ask the person who gave you the key pairs to make sure the IAM user has proper permission. You can also ask the other bucket owner to set up replication so everything under his\her bucket will be replicated to your bucket (you would need to have a bucket policy to allow the replication on your bucket as well)

https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html

Another option for you to download files directly from that bucket without using key pairs is to use Presigned URL. This requires the bucket owner to set it up and share the URL with you.

AWS
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.