AWS CLI S3 A client error (403) occurred when calling the HeadObject operation: Forbidden

前端 未结 21 2016

I\'m trying to setup a Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy from a S3 bucket.

 aws --debug s3 cp s3://aws-codede         


        
21条回答
  •  时光取名叫无心
    2020-12-03 04:43

    Permissions

    You need the s3:GetObject permission for this operation. For more information, see Specifying Permissions in a Policy. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.

    If you have the s3:ListBucket permission on the bucket, Amazon S3 returns an HTTP status code 404 ("no such key") error.
    
    If you don’t have the s3:ListBucket permission, Amazon S3 returns an HTTP status code 403 ("access denied") error.
    

    The following operation is related to HeadObject:

    GetObject
    

    Source: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html

提交回复
热议问题