Access Denied upload to s3

前端 未结 3 1747
渐次进展
渐次进展 2021-02-19 01:16

I tried uploading to s3 and when I see the logs from the s3 bucket logs this is what it says:

mybucket-me [17/Oct/2013:08:18:57 +0000] 120.28.112.39 
arn:aws:sts         


        
3条回答
  •  有刺的猬
    2021-02-19 01:34

    To upload to S3 bucket, you need to Add/Create IAM/Group Policy, for example:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": ["s3:ListBucket"],
          "Resource": ["arn:aws:s3:::test"]
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:PutObject",
            "s3:GetObject",
            "s3:DeleteObject"
          ],
          "Resource": ["arn:aws:s3:::test/*"]
        }
      ]
    }
    

    Where arn:aws:s3:::test is your Amazon Resource Name (ARN).

    Source: Writing IAM Policies: How to Grant Access to an Amazon S3 Bucket

    Related:

    • Specifying Resources in a Policy
    • How to provide a user to access only a particular bucket in AWS S3?

提交回复
热议问题