Create an AWS Passkey That Only Permits s3

I want to create an AWS passkey that only allows s3. This means that the key cannot be used with any other service. Is it possible? How?

+4
source share
2 answers

Is it possible

Yes. You can use AWS Identity and Access Management (IAM)

Ideally, you should never give administrator / master credentials for anything other than creating different IAMs.

Therefore, create different users with the necessary securities and create access keys for them and use them.

AS

AWS Console IAM

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

S3Browser, , this

+5

, IAM aws ​​:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1397557252000",
      "Effect": "Allow",
      "Action": [
        "s3:*"
      ],
      "Resource": [
        "arn:aws:s3:::*"
      ]
    }
  ]
}
+5

Source: https://habr.com/ru/post/1536753/


All Articles